Merge lp:~carla-sella/ubuntu-calendar-app/weekview-testing-stubs-completed into lp:ubuntu-calendar-app

Proposed by Carla Sella
Status: Superseded
Proposed branch: lp:~carla-sella/ubuntu-calendar-app/weekview-testing-stubs-completed
Merge into: lp:ubuntu-calendar-app
Diff against target: 39 lines (+17/-1)
2 files modified
tests/autopilot/calendar_app/__init__.py (+11/-0)
tests/autopilot/calendar_app/tests/test_weekview.py (+6/-1)
To merge this branch: bzr merge lp:~carla-sella/ubuntu-calendar-app/weekview-testing-stubs-completed
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Nicholas Skaggs Pending
Review via email: mp+254493@code.launchpad.net

This proposal has been superseded by a proposal from 2015-03-29.

Commit message

Autopilot tests for Calendar app

Description of the change

Completing test_default_view in test_weekview.py.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Carla Sella (carla-sella) wrote :

This can be merged if ok as checking if current day is highlighted has been completed.

617. By Carla Sella

Added test_day_to_week.

618. By Carla Sella

Fixed test_day_to_week test.

619. By Carla Sella

Fixed pep8 and pylflakes.

620. By Carla Sella

Adding test test_month_to_week.

621. By Carla Sella

Completed test_month_to_week.

622. By Carla Sella

Added test_today_button in month view.

623. By Carla Sella

Added test_today_button in year view.

624. By Carla Sella

Completed test test_scroll_week_must_scroll_weekdays.

625. By Carla Sella

Completed test_change_week_across_months.

626. By Carla Sella

Completed test_change_week_across_year.

627. By Carla Sella

Fixed two text conflicts.

628. By Carla Sella

Fixed wrong function name.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/calendar_app/__init__.py'
2--- tests/autopilot/calendar_app/__init__.py 2015-03-07 10:14:46 +0000
3+++ tests/autopilot/calendar_app/__init__.py 2015-03-29 13:41:25 +0000
4@@ -427,6 +427,17 @@
5 sorteddays.insert(0, day)
6 return sorteddays
7
8+ @autopilot.logging.log_action(logger.info)
9+ def get_headerdatecomponent(self, now):
10+ today = datetime.date(now.year, now.month, now.day)
11+ header_date_components = self.select_many('HeaderDateComponent')
12+ for header in header_date_components:
13+ header_date = datetime.date(header.date.datetime.year,
14+ header.date.datetime.month,
15+ header.date.datetime.day)
16+ if header_date == today:
17+ return header
18+
19
20 class MonthView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
21
22
23=== modified file 'tests/autopilot/calendar_app/tests/test_weekview.py'
24--- tests/autopilot/calendar_app/tests/test_weekview.py 2015-02-26 16:29:18 +0000
25+++ tests/autopilot/calendar_app/tests/test_weekview.py 2015-03-29 13:41:25 +0000
26@@ -61,7 +61,12 @@
27 self.assertThat(self.app.main_view.get_month_year(self.week_view),
28 Equals(expected_month_name_year))
29
30- # TODO: check current day is highlighted
31+ # check current day is highlighted
32+ header_date = self.week_view.get_headerdatecomponent(now)
33+ self.assertEquals(header_date.dayColor[0], 221)
34+ self.assertEquals(header_date.dayColor[1], 72)
35+ self.assertEquals(header_date.dayColor[2], 20)
36+ self.assertEquals(header_date.dayColor[3], 255)
37
38 # These testing stubs need completed
39 # def test_scroll_week_must_scroll_within_week(self):

Subscribers

People subscribed via source and target branches

to status/vote changes: