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
111
gaia/apps/calendar/test/marionette/toggle_calendar_test.js
Executable file
111
gaia/apps/calendar/test/marionette/toggle_calendar_test.js
Executable file
|
|
@ -0,0 +1,111 @@
|
|||
'use strict';
|
||||
|
||||
var Calendar = require('./lib/calendar'),
|
||||
assert = require('chai').assert;
|
||||
|
||||
marionette('toggle calendar', function() {
|
||||
var app;
|
||||
var client = marionette.client({
|
||||
profile: {
|
||||
prefs: {
|
||||
// we need to disable the keyboard to avoid intermittent failures on
|
||||
// Travis (transitions might take longer to run and block UI)
|
||||
'dom.mozInputMethod.enabled': false,
|
||||
// Do not require the B2G-desktop app window to have focus (as per the
|
||||
// system window manager) in order for it to do focus-related things.
|
||||
'focusmanager.testmode': true,
|
||||
}
|
||||
},
|
||||
desiredCapabilities: { raisesAccessibilityExceptions: false }
|
||||
});
|
||||
|
||||
setup(function() {
|
||||
app = new Calendar(client);
|
||||
app.launch();
|
||||
});
|
||||
|
||||
function toggleLocalCalendar() {
|
||||
app.openSettingsView();
|
||||
app.settings.toggleCalendar();
|
||||
app.closeSettingsView();
|
||||
}
|
||||
|
||||
suite('> regular event', function() {
|
||||
setup(function() {
|
||||
app.createEvent({
|
||||
title: 'Toggle Calendar Test',
|
||||
location: 'Some Place'
|
||||
});
|
||||
toggleLocalCalendar();
|
||||
});
|
||||
|
||||
suite('disable calendar', function() {
|
||||
test('month view', function() {
|
||||
client.waitFor(function() {
|
||||
return app.monthDay.events.length === 0;
|
||||
});
|
||||
assert.equal(app.month.busyDots.length, 0, 'no busy dots');
|
||||
});
|
||||
|
||||
test('week view', function() {
|
||||
app.openWeekView();
|
||||
client.waitFor(function() {
|
||||
return app.week.events.length === 0;
|
||||
});
|
||||
});
|
||||
|
||||
test('day view', function() {
|
||||
app.openDayView();
|
||||
client.waitFor(function() {
|
||||
return app.day.events.length === 0;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('enable calendar', function() {
|
||||
setup(toggleLocalCalendar);
|
||||
|
||||
test('month view', function() {
|
||||
client.waitFor(function() {
|
||||
return app.monthDay.events.length;
|
||||
});
|
||||
});
|
||||
|
||||
test('week view', function() {
|
||||
app.openWeekView();
|
||||
client.waitFor(function() {
|
||||
return app.week.events.length;
|
||||
});
|
||||
});
|
||||
|
||||
test('day view', function() {
|
||||
app.openDayView();
|
||||
client.waitFor(function() {
|
||||
return app.day.events.length;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('> all day event', function() {
|
||||
setup(function() {
|
||||
app.createEvent({
|
||||
title: 'Toggle Calendar Test',
|
||||
location: 'Some Place',
|
||||
allDay: true
|
||||
});
|
||||
toggleLocalCalendar();
|
||||
});
|
||||
|
||||
test('should not hide all day on day view', function() {
|
||||
app.openDayView();
|
||||
client.waitFor(function() {
|
||||
return app.day.events.length === 0;
|
||||
});
|
||||
assert.ok(
|
||||
app.day.allDaysHolder.displayed(),
|
||||
'all day should be displayed'
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue