Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
68
gaia/apps/system/test/marionette/lib/dialog.js
Executable file
68
gaia/apps/system/test/marionette/lib/dialog.js
Executable file
|
|
@ -0,0 +1,68 @@
|
|||
'use strict';
|
||||
|
||||
function Dialog(client) {
|
||||
this.client = client.scope({
|
||||
searchTimeout: 20000
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = Dialog;
|
||||
|
||||
Dialog.Selector = {
|
||||
visibleDialog: '.generic-dialog.visible',
|
||||
okButton: '.generic-dialog.visible .affirmative',
|
||||
messageContainer: '.generic-dialog.visible .inner',
|
||||
promptInput: '.generic-dialog.visible .modal-dialog-prompt-input',
|
||||
menu: '.generic-dialog.visible menu',
|
||||
title: '.generic-dialog.visible .inner h3'
|
||||
};
|
||||
|
||||
Dialog.prototype = {
|
||||
client: null,
|
||||
system: null,
|
||||
alert: function(message) {
|
||||
this.client.executeScript(function(message) {
|
||||
return window.setTimeout(function() {
|
||||
window.wrappedJSObject.alert(message);
|
||||
});
|
||||
}, [message]);
|
||||
},
|
||||
confirm: function(message) {
|
||||
this.client.executeScript(function(message) {
|
||||
return window.setTimeout(function() {
|
||||
window.wrappedJSObject.confirm(message);
|
||||
});
|
||||
}, [message]);
|
||||
},
|
||||
prompt: function(message) {
|
||||
this.client.executeScript(function(message) {
|
||||
return window.setTimeout(function() {
|
||||
window.wrappedJSObject.prompt(message);
|
||||
});
|
||||
}, [message]);
|
||||
},
|
||||
|
||||
get current() {
|
||||
return this.client.helper.waitForElement(Dialog.Selector.visibleDialog);
|
||||
},
|
||||
|
||||
get okButton() {
|
||||
return this.client.helper.waitForElement(Dialog.Selector.okButton);
|
||||
},
|
||||
|
||||
get menu() {
|
||||
return this.client.findElement(Dialog.Selector.menu);
|
||||
},
|
||||
|
||||
get title() {
|
||||
return this.client.helper.waitForElement(Dialog.Selector.title);
|
||||
},
|
||||
|
||||
get messageContainer() {
|
||||
return this.client.findElement(Dialog.Selector.messageContainer);
|
||||
},
|
||||
|
||||
get promptInput() {
|
||||
return this.client.findElement(Dialog.Selector.promptInput);
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue