Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
28 lines
595 B
JavaScript
Executable file
28 lines
595 B
JavaScript
Executable file
/* global module */
|
|
'use strict';
|
|
|
|
function Statusbar(client) {
|
|
this.client = client;
|
|
}
|
|
|
|
module.exports = Statusbar;
|
|
|
|
Statusbar.Selector = Object.freeze({
|
|
playingIndicator: '#statusbar-playing'
|
|
});
|
|
|
|
Statusbar.prototype = {
|
|
client: null,
|
|
|
|
get playingIndicator() {
|
|
this.client.switchToFrame();
|
|
return this.client.findElement(Statusbar.Selector.playingIndicator);
|
|
},
|
|
|
|
waitForPlayingIndicatorShown: function(shouldBeShown) {
|
|
this.client.waitFor(function() {
|
|
var shown = this.playingIndicator.displayed();
|
|
return shown === shouldBeShown;
|
|
}.bind(this));
|
|
}
|
|
};
|