Closed
Bug 1328097
Opened 9 years ago
Closed 9 years ago
[mozmill] testTodayPane failing on single digit months and days
Categories
(Calendar :: Internal Components, defect)
Calendar
Internal Components
Tracking
(Not tracked)
RESOLVED
FIXED
5.5
People
(Reporter: Taraman, Assigned: Taraman)
References
Details
Attachments
(1 file)
|
1.21 KB,
patch
|
MakeMyDay
:
review+
|
Details | Diff | Splinter Review |
The function getIsoDate does not take into account for padding 0 before single digit months and days.
e.g. on 2017-01-01 the returned string is 201711
| Assignee | ||
Comment 1•9 years ago
|
||
Padding zeros does the trick.
Comment 2•9 years ago
|
||
Comment on attachment 8823031 [details] [diff] [review]
Ptach V1.0
Review of attachment 8823031 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for coming up with a fix quickly. r+ with the below comments considered.
::: calendar/test/mozmill/testTodayPane.js
@@ +270,4 @@
> let soon = lookup(`
> /id("messengerWindow")/id("tabmail-container")/id("today-pane-panel")/
> [1]/id("agenda-panel")/{"flex":"1"}/id("agenda-listbox")/[2]/
> + anon({"class":"agenda-checkbox"})
Whitespaces
@@ +287,5 @@
> + function padToTwo(n) {
> + return n < 10 ? `0${n}` : `${n}`;
> + }
> + let month = padToTwo(currDate.getMonth() + 1);
> + let day = padToTwo(currDate.getDate());
If you define nested functions, put the inner declaration to the top of the outer or assign the inner to a variable instead to avoid strict mode errors. However, here you can use directly
let month = currDate.getMonth() + 1).toString().padStart(2, "0");
let day = currDate.getDate().toString().padStart(2, "0");
Attachment #8823031 -
Flags: review?(makemyday) → review+
| Assignee | ||
Comment 3•9 years ago
|
||
with the comments fixed
pushed to -> https://hg.mozilla.org/comm-central/rev/2e479125e5d9
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 5.5
| Assignee | ||
Comment 4•9 years ago
|
||
We have one failure on comm-central in this test after the push.
> 15:51:44 INFO - SUMMARY-UNEXPECTED-FAIL | testTodayPane.js | testTodayPane.js::testTodayPane
> 15:51:44 INFO - EXCEPTION: waitFor: Timeout exceeded for '() => {
> 15:51:44 INFO - return iframe.contentWindow.onLoad &&
> 15:51:44 INFO - iframe.contentWindow.onLoad.hasLoaded == true;
> 15:51:44 INFO - }'
This is due to the event dialog not opening in time and not related to this issue.
You need to log in
before you can comment on or make changes to this bug.
Description
•