Merge lp:~carla-sella/ubuntu-calendar-app/dayview-test-default-view into lp:ubuntu-calendar-app
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Nicholas Skaggs on 2015-04-10 | ||||
| Approved revision: | 610 | ||||
| Merged at revision: | 624 | ||||
| Proposed branch: | lp:~carla-sella/ubuntu-calendar-app/dayview-test-default-view | ||||
| Merge into: | lp:ubuntu-calendar-app | ||||
| Diff against target: |
216 lines (+120/-17) 3 files modified
HeaderDateComponent.qml (+1/-0) tests/autopilot/calendar_app/__init__.py (+72/-13) tests/autopilot/calendar_app/tests/test_dayview.py (+47/-4) |
||||
| To merge this branch: | bzr merge lp:~carla-sella/ubuntu-calendar-app/dayview-test-default-view | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve on 2015-04-06 | |
| Nicholas Skaggs | 2015-03-21 | Pending | |
|
Review via email:
|
|||
Commit Message
Autopilot test for Calendar app
Description of the Change
Dayview: test default view.
| Carla Sella (carla-sella) wrote : | # |
| Carla Sella (carla-sella) wrote : | # |
Should be ok now.
FAILED: Continuous integration, rev:607
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 608. By Carla Sella on 2015-03-22
-
Fixed identation errror.
FAILED: Continuous integration, rev:608
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Carla Sella (carla-sella) wrote : | # |
Reported bug #1435542 as in Italy Sunday is the first day of the week and yesterday, 22nd March the week number was 12 and not 11, so this test failed, but should not have:
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
raise mismatch_error
testtools.
| Carla Sella (carla-sella) wrote : | # |
I found out why the test is failing only on Sundays.
If you look at the screenshot:
https:/
You can see how the days in Calendar app are displayed, Sunday is together with Saturday and Friday on the same page where there is the W13 week number label, but friday and saturday are W13 while sunday is W14.
That means that, for instance sunday 5 april is displayed on W13 but is
W14 instead.
So the test fails if you are testing on sunday 5 april because I am checking day label and day of week label are correct, the label is correct for two day but not for the third only in pages displaying Friday, Saturday and Sunday together.
So the question is: what should I do if the day I am testing on is a Sunday, this test will always fail on Sundays as Sundays are already on a next week number-
I can verify that if the day I am testing on is a Sunday I have to subtact 1 to week number, but not sure this is what you want me to do.
Carla
- 609. By Carla Sella on 2015-04-04
-
Added test_today_button.
FAILED: Continuous integration, rev:609
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Kunal Parmar (pkunal-parmar) wrote : | # |
> I found out why the test is failing only on Sundays.
> If you look at the screenshot:
>
> https:/
>
> You can see how the days in Calendar app are displayed, Sunday is together
> with Saturday and Friday on the same page where there is the W13 week number
> label, but friday and saturday are W13 while sunday is W14.
> That means that, for instance sunday 5 april is displayed on W13 but is
> W14 instead.
> So the test fails if you are testing on sunday 5 april because I am checking
> day label and day of week label are correct, the label is correct for two day
> but not for the third only in pages displaying Friday, Saturday and Sunday
> together.
>
> So the question is: what should I do if the day I am testing on is a Sunday,
> this test will always fail on Sundays as Sundays are already on a next week
> number-
>
> I can verify that if the day I am testing on is a Sunday I have to subtact 1
> to week number, but not sure this is what you want me to do.
>
> Carla
Hello Carla,
There seem some issue with logic how we calculate week numer from date.
Date.prototype.
var date = this.weekStart(
This is function used, in dateext.js, and looks like week's start day here is hard coded.
I gave you a branch where I resolved this issue, that patch calculate week number by taking in account what is week start day.
Please check with that branch as well.
| Carla Sella (carla-sella) wrote : | # |
Hello Kunal,
I merged your branch into mine. It works if I run this test on a Sunday (for instance Sun 5th April), but fails if I run it on the 31st of March for instance, I get this errror:
Traceback (most recent call last):
File "/home/
self.
File "/usr/lib/
self.
File "/usr/lib/
raise mismatch_error
testtools.
| Kunal Parmar (pkunal-parmar) wrote : | # |
> Hello Kunal,
> I merged your branch into mine. It works if I run this test on a Sunday (for
> instance Sun 5th April), but fails if I run it on the 31st of March for
> instance, I get this errror:
>
> Traceback (most recent call last):
> File "/home/
> view/tests/
> test_default_view
> self.day_
> File "/usr/lib/
> assertEqual
> self.assertThat
> File "/usr/lib/
> assertThat
> raise mismatch_error
> testtools.
Hello Carla,
I read python strftime doc. As per it, week start from 00 and end at 53. As per our implementation it start from 1 and end at 54.
Also we need to check what is locale set as per that we should use %U or %W.
I referred this link https:/
- 610. By Carla Sella on 2015-04-06
-
Fixed cheching week number.
| Carla Sella (carla-sella) wrote : | # |
To me looks like using %W instead of %U fixes the issue, but I am not sure. Maybe someone can double check ?
PASSED: Continuous integration, rev:610
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Nicholas Skaggs (nskaggs) wrote : | # |
%W can work, so long as we assume a Monday as first day of the week locale.


Still need to verify that the day should be scrolled to the current time.