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
115
gaia/apps/system/test/marionette/lib/activitycallerapp.js
Executable file
115
gaia/apps/system/test/marionette/lib/activitycallerapp.js
Executable file
|
|
@ -0,0 +1,115 @@
|
|||
'use strict';
|
||||
|
||||
function ActivityCallerApp(client) {
|
||||
this.client = client;
|
||||
}
|
||||
module.exports = ActivityCallerApp;
|
||||
|
||||
ActivityCallerApp.ORIGIN = 'app://activitycaller.gaiamobile.org';
|
||||
|
||||
ActivityCallerApp.Selector = Object.freeze({
|
||||
header: 'h1',
|
||||
launchactivity: '#launchactivity',
|
||||
testchainactivity: '#testchainactivity',
|
||||
testdefaultactivity: '#testdefaultactivity',
|
||||
closeButton: '#close',
|
||||
inputElement: '#input',
|
||||
dateInputElement: '#dateinput',
|
||||
selectElement: '#select'
|
||||
});
|
||||
|
||||
ActivityCallerApp.prototype = {
|
||||
get header() {
|
||||
return this.client.findElement(ActivityCallerApp.Selector.header);
|
||||
},
|
||||
|
||||
get launchactivity() {
|
||||
return this.client.findElement(ActivityCallerApp.Selector.launchactivity);
|
||||
},
|
||||
|
||||
get testchainactivity() {
|
||||
return this.client.findElement(
|
||||
ActivityCallerApp.Selector.testchainactivity);
|
||||
},
|
||||
|
||||
get testdefaultactivity() {
|
||||
return this.client.findElement(
|
||||
ActivityCallerApp.Selector.testdefaultactivity);
|
||||
},
|
||||
|
||||
get closeButton() {
|
||||
return this.client.findElement(ActivityCallerApp.Selector.closeButton);
|
||||
},
|
||||
|
||||
get inputElement() {
|
||||
return this.client.findElement(ActivityCallerApp.Selector.inputElement);
|
||||
},
|
||||
|
||||
get selectElement() {
|
||||
return this.client.findElement(ActivityCallerApp.Selector.selectElement);
|
||||
},
|
||||
|
||||
get dateInputElement() {
|
||||
return this.client.findElement(ActivityCallerApp.Selector.dateInputElement);
|
||||
},
|
||||
|
||||
switchTo: function() {
|
||||
this.client.switchToFrame();
|
||||
this.client.apps.switchToApp(ActivityCallerApp.ORIGIN);
|
||||
},
|
||||
|
||||
launch: function() {
|
||||
var client = this.client;
|
||||
client.apps.launch(ActivityCallerApp.ORIGIN);
|
||||
client.apps.switchToApp(ActivityCallerApp.ORIGIN);
|
||||
client.helper.waitForElement('body');
|
||||
},
|
||||
|
||||
startActivity: function() {
|
||||
this.switchTo();
|
||||
this.launchactivity.tap();
|
||||
this.client.switchToFrame();
|
||||
},
|
||||
|
||||
startChainActivity: function() {
|
||||
this.switchTo();
|
||||
this.testchainactivity.tap();
|
||||
this.client.switchToFrame();
|
||||
},
|
||||
|
||||
startDefaultActivity: function() {
|
||||
this.switchTo();
|
||||
this.testdefaultactivity.tap();
|
||||
this.client.switchToFrame();
|
||||
},
|
||||
|
||||
close: function() {
|
||||
this.switchTo();
|
||||
this.closeButton.tap();
|
||||
this.client.switchToFrame();
|
||||
},
|
||||
|
||||
focusTextInput: function() {
|
||||
this.switchTo();
|
||||
this.inputElement.tap();
|
||||
this.client.switchToFrame();
|
||||
},
|
||||
|
||||
focusSelect: function() {
|
||||
this.switchTo();
|
||||
this.selectElement.tap();
|
||||
this.client.switchToFrame();
|
||||
},
|
||||
|
||||
focusDateInput: function() {
|
||||
this.switchTo();
|
||||
this.dateInputElement.tap();
|
||||
this.client.switchToFrame();
|
||||
},
|
||||
|
||||
blurFocusedInput: function() {
|
||||
this.switchTo();
|
||||
this.header.tap();
|
||||
this.client.switchToFrame();
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue