Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
44 lines
810 B
JavaScript
Executable file
44 lines
810 B
JavaScript
Executable file
'use strict';
|
|
|
|
var View = require('./view');
|
|
|
|
function Settings() {
|
|
View.apply(this, arguments);
|
|
}
|
|
module.exports = Settings;
|
|
|
|
Settings.prototype = {
|
|
__proto__: View.prototype,
|
|
|
|
selector: '#settings',
|
|
|
|
setupAdvancedSettings: function() {
|
|
this.client
|
|
.findElement('li.settings')
|
|
.click();
|
|
},
|
|
|
|
sync: function() {
|
|
this
|
|
.findElement('[role="tablist"] .sync')
|
|
.click();
|
|
},
|
|
|
|
calendars: function() {
|
|
return this
|
|
.findElements('.calendars .name')
|
|
.map(function(element) {
|
|
return element.text();
|
|
});
|
|
},
|
|
|
|
toggleCalendar: function(name) {
|
|
name = name || 'Offline calendar';
|
|
this
|
|
.findElements('gaia-checkbox label')
|
|
.filter(function(element) {
|
|
return element.text() === name;
|
|
})[0]
|
|
.click();
|
|
}
|
|
};
|