mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 982140 - Add automated test for removing properties from the manifest. r=jryans
This commit is contained in:
parent
e042206a19
commit
5b05523857
@ -24,6 +24,7 @@ function test() {
|
||||
yield changeManifestValueBad("name", "the worst app");
|
||||
yield addNewManifestProperty("developer", "foo", "bar");
|
||||
yield addNewManifestPropertyBad("developer", "blob", "bob");
|
||||
yield removeManifestProperty("developer", "foo");
|
||||
gManifestWindow = null;
|
||||
gManifestEditor = null;
|
||||
|
||||
@ -162,3 +163,26 @@ function addNewManifestPropertyBad(parent, key, value) {
|
||||
"Manifest contains key, but it should not");
|
||||
});
|
||||
}
|
||||
|
||||
function removeManifestProperty(parent, key) {
|
||||
info("*** Remove property test ***");
|
||||
|
||||
return Task.spawn(function() {
|
||||
let parentElem = gManifestWindow.document
|
||||
.querySelector("[id ^= '" + parent + "']");
|
||||
ok(parentElem, "Found parent element");
|
||||
|
||||
let keyExists = key in gManifestEditor.manifest[parent];
|
||||
ok(keyExists,
|
||||
"The manifest contains the key under the expected parent");
|
||||
|
||||
let newElem = gManifestWindow.document.querySelector("[id ^= '" + key + "']");
|
||||
let removePropertyButton = newElem.querySelector(".variables-view-delete");
|
||||
ok(removePropertyButton, "The remove property button was found");
|
||||
removePropertyButton.click();
|
||||
|
||||
yield waitForUpdate();
|
||||
|
||||
ok(!(key in gManifestEditor.manifest[parent]), "Property was successfully removed");
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user