VulpesOS/gaia/apps/calendar/test/marionette/lib/views/settings.js
OverSu b38dea0597 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.
2026-09-30 23:13:03 +02:00

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();
}
};