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
47
gaia/apps/settings/test/marionette/app/regions/bluetooth.js
Executable file
47
gaia/apps/settings/test/marionette/app/regions/bluetooth.js
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
'use strict';
|
||||
var Base = require('../base');
|
||||
|
||||
/**
|
||||
* Abstraction around settings bluetooth panel
|
||||
* @constructor
|
||||
* @param {Marionette.Client} client for operations.
|
||||
*/
|
||||
function BluetoothPanel(client) {
|
||||
|
||||
// Call the Base constructor to initiate base class.
|
||||
Base.call(this, client, null, BluetoothPanel.Selectors);
|
||||
|
||||
}
|
||||
|
||||
module.exports = BluetoothPanel;
|
||||
|
||||
BluetoothPanel.Selectors = {
|
||||
'bluetoothEnabledCheckbox': '.bluetooth-status gaia-switch'
|
||||
};
|
||||
|
||||
BluetoothPanel.prototype = {
|
||||
|
||||
__proto__: Base.prototype,
|
||||
|
||||
get isBluetoothEnabled() {
|
||||
return this.findElement('bluetoothEnabledCheckbox')
|
||||
.scriptWith(function(el) {
|
||||
return el.wrappedJSObject.checked;
|
||||
});
|
||||
},
|
||||
|
||||
enableBluetooth: function() {
|
||||
this.waitForElement('bluetoothEnabledCheckbox').tap();
|
||||
this.client.waitFor(function() {
|
||||
return this.isBluetoothEnabled;
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
disableBluetooth: function() {
|
||||
this.waitForElement('bluetoothEnabledCheckbox').tap();
|
||||
this.client.waitFor(function() {
|
||||
return !this.isBluetoothEnabled;
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
};
|
||||
Loading…
Reference in a new issue