~ci-train-bot/ubuntu-settings-components/ubuntu-settings-components-ubuntu-yakkety-landing-078

« back to all changes in this revision

Viewing changes to tests/qmltests/Menus/tst_CalendarMenu.qml

  • Committer: Bileto Bot
  • Author(s): Lukáš Tinkl
  • Date: 2016-09-09 14:38:53 UTC
  • mfrom: (162.1.3 calendarDoubleThirty)
  • Revision ID: ci-train-bot@canonical.com-20160909143853-xc2chpzog3lby400
Calculate the days to add for the next week correctly (LP: #1620496)

Approved by: Albert Astals Cid, Unity8 CI Bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    property var date1: new Date(2012, 2, 10)
29
29
    property var date2: new Date(2013, 5, 10)
30
30
    property var date3: new Date(2014, 6, 10)
 
31
    property var date4: new Date(2016, 9, 30)
 
32
    property var date5: new Date(2016, 9, 31)
31
33
 
32
34
    Flickable {
33
35
        id: flickable
83
85
            calendar.selectedDate = date2
84
86
            compare(calendar.selectedDate, date2, "Cannot set selectedDate")
85
87
        }
 
88
 
 
89
        // regression test for https://bugs.launchpad.net/ubuntu/+source/ubuntu-settings-components/+bug/1620496
 
90
        function test_double30thOctober() {
 
91
            calendar.selectedDate = date4;
 
92
            calendar.selectedDate = calendar.selectedDate.addDays(1);
 
93
            compare(calendar.selectedDate, date5, "The next day after 2016-10-30 is not 2016-10-31");
 
94
        }
86
95
    }
87
96
}