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
57
gaia/apps/settings/test/marionette/app/system_app.js
Executable file
57
gaia/apps/settings/test/marionette/app/system_app.js
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
'use strict';
|
||||
var Base = require('./base');
|
||||
|
||||
// origin of the settings app
|
||||
var ORIGIN = 'app://settings.gaiamobile.org';
|
||||
|
||||
/**
|
||||
* Abstraction around system app
|
||||
* @constructor
|
||||
* @param {Marionette.Client} client for operations.
|
||||
*/
|
||||
function SystemApp(client) {
|
||||
Base.call(this, client, ORIGIN, SystemApp.Selectors);
|
||||
}
|
||||
module.exports = SystemApp;
|
||||
|
||||
SystemApp.Selectors = {
|
||||
'actionMenu': 'form[data-z-index-level="action-menu"]',
|
||||
'valueSelector': '.value-selector',
|
||||
'confirmOkButton': '.appWindow.active .modal-dialog-confirm-ok'
|
||||
};
|
||||
|
||||
SystemApp.prototype = {
|
||||
|
||||
__proto__: Base.prototype,
|
||||
|
||||
isActionMenuVisible: function() {
|
||||
var actionMenu = null,
|
||||
displayed = false;
|
||||
this.client.switchToFrame();
|
||||
actionMenu = this.waitForElement('actionMenu');
|
||||
displayed = actionMenu && actionMenu.displayed();
|
||||
// Go back to settings app.
|
||||
this.launch();
|
||||
return displayed;
|
||||
},
|
||||
|
||||
isValueSelectorVisible: function() {
|
||||
var valueSelector = null,
|
||||
displayed = false;
|
||||
this.client.switchToFrame();
|
||||
valueSelector = this.waitForElement('valueSelector');
|
||||
displayed = valueSelector && valueSelector.displayed();
|
||||
// Go back to settings app.
|
||||
this.launch();
|
||||
return displayed;
|
||||
},
|
||||
|
||||
/*
|
||||
/* Click the ok button on window.confirm dialog.
|
||||
*/
|
||||
confirmOk: function() {
|
||||
this.client.switchToFrame();
|
||||
var confirmButton = this.waitForElement('confirmOkButton');
|
||||
confirmButton.click();
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue