-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 972666 - [Calendar] lines over events longer than 2 hours
- Loading branch information
1 parent
c12edf5
commit 646b111
Showing
8 changed files
with
173 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
'use strict'; | ||
|
||
var Calendar = require('./calendar'), | ||
assert = require('chai').assert; | ||
|
||
marionette('month view', function() { | ||
var app; | ||
var client = marionette.client(); | ||
|
||
setup(function() { | ||
app = new Calendar(client); | ||
app.launch({ hideSwipeHint: true }); | ||
}); | ||
|
||
test('#months-day-view scroll', function() { | ||
app.createEvent({ | ||
title: 'Long Event', | ||
location: 'Dolor Amet', | ||
startHour: 0, | ||
duration: 16 | ||
}); | ||
app.waitForMonthView(); | ||
|
||
var monthDayViewEvents = app.findElement('monthDayViewEvents'); | ||
|
||
assert.equal( | ||
monthDayViewEvents.getAttribute('scrollTop'), | ||
0, | ||
'scroll should start at zero' | ||
); | ||
|
||
var pos = monthDayViewEvents.location(); | ||
var x = pos.x + 30; | ||
var body = client.findElement('body'); | ||
// fast vertical swipe, needs to happen on the body since we want | ||
// coordinates to be absolute | ||
app.actions | ||
.flick(body, x, pos.y + 10, x, 50) | ||
.perform(); | ||
|
||
// this will timeout if scroll did not change | ||
client.waitFor(function() { | ||
return monthDayViewEvents.getAttribute('scrollTop') > 0; | ||
}); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters