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
71
gaia/apps/system/test/marionette/lib/fake_music.js
Executable file
71
gaia/apps/system/test/marionette/lib/fake_music.js
Executable file
|
|
@ -0,0 +1,71 @@
|
|||
'use strict';
|
||||
|
||||
function FakeMusic(client, origin) {
|
||||
this.client = client;
|
||||
this.origin = origin;
|
||||
}
|
||||
|
||||
module.exports = FakeMusic;
|
||||
|
||||
FakeMusic.Selector = Object.freeze({
|
||||
albumOneElement: '#album-one',
|
||||
playPauseElement: '#play-pause',
|
||||
stopElement: '#stop',
|
||||
previousTrackElement: '#previous',
|
||||
nextTrackElement: '#next',
|
||||
|
||||
interruptElement: '#interrupt'
|
||||
});
|
||||
|
||||
FakeMusic.prototype = {
|
||||
client: null,
|
||||
|
||||
get albumOneElement() {
|
||||
return this.client.findElement(FakeMusic.Selector.albumOneElement);
|
||||
},
|
||||
|
||||
get playPauseElement() {
|
||||
return this.client.findElement(FakeMusic.Selector.playPauseElement);
|
||||
},
|
||||
|
||||
get stopElement() {
|
||||
return this.client.findElement(FakeMusic.Selector.stopElement);
|
||||
},
|
||||
|
||||
get previousTrackElement() {
|
||||
return this.client.findElement(FakeMusic.Selector.previousTrackElement);
|
||||
},
|
||||
|
||||
get nextTrackElement() {
|
||||
return this.client.findElement(FakeMusic.Selector.nextTrackElement);
|
||||
},
|
||||
|
||||
get interruptElement() {
|
||||
return this.client.findElement(FakeMusic.Selector.interruptElement);
|
||||
},
|
||||
|
||||
get isPlaying() {
|
||||
var className = this.playPauseElement.getAttribute('class');
|
||||
return !(/\bis-paused\b/.test(className));
|
||||
},
|
||||
|
||||
launchInBackground: function() {
|
||||
this.client.apps.launch(this.origin);
|
||||
this.client.apps.switchToApp(this.origin);
|
||||
|
||||
// Wait until the app has told us it's fully loaded.
|
||||
this.client.helper.waitForElement('body.loaded');
|
||||
|
||||
this.client.switchToFrame();
|
||||
},
|
||||
|
||||
close: function() {
|
||||
this.client.apps.close(this.origin);
|
||||
},
|
||||
|
||||
runInApp: function(callback) {
|
||||
this.client.apps.switchToApp(this.origin);
|
||||
callback();
|
||||
this.client.switchToFrame();
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue