← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/dayview-test-default-view into lp:ubuntu-calendar-app

 

> I found out why the test is failing only on Sundays.
> If you look at the screenshot:
> 
> https://dl.dropboxusercontent.com/u/10083981/Ubuntu%20phone/Calendar.png
> 
> 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.weekNumber = function() {
    var date = this.weekStart(1).addDays(3) // Thursday midnight

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.
-- 
https://code.launchpad.net/~carla-sella/ubuntu-calendar-app/dayview-test-default-view/+merge/253760
Your team Ubuntu Calendar Developers is subscribed to branch lp:ubuntu-calendar-app.


References