ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #00196
[Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
Carla Sella has proposed merging lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app.
Commit message:
Autopilot test for Calendar App.
Requested reviews:
Nicholas Skaggs (nskaggs)
Related bugs:
Bug #1426068 in Ubuntu Calendar App: "Autopilot test: monthview test suite need updated"
https://bugs.launchpad.net/ubuntu-calendar-app/+bug/1426068
For more details, see:
https://code.launchpad.net/~carla-sella/ubuntu-calendar-app/current-day-month-year-selected/+merge/251387
Updating monthview test suite.
--
Your team Ubuntu Calendar Developers is subscribed to branch lp:ubuntu-calendar-app.
=== modified file 'MonthView.qml'
--- MonthView.qml 2015-02-18 19:27:20 +0000
+++ MonthView.qml 2015-03-01 14:08:04 +0000
@@ -50,6 +50,7 @@
]
contents: Label {
+ objectName:"monthYearLabel"
fontSize: "x-large"
// TRANSLATORS: this is a time formatting string,
// see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
=== modified file 'tests/autopilot/calendar_app/__init__.py'
--- tests/autopilot/calendar_app/__init__.py 2015-02-26 18:26:10 +0000
+++ tests/autopilot/calendar_app/__init__.py 2015-03-01 14:08:04 +0000
@@ -386,6 +386,9 @@
month = self.get_current_month()
return month.currentMonth.datetime.strftime("%B")
+ def get_current_selected_day(self):
+ return self.select_many('MonthComponentDateDelegate', isToday=True)
+
class DayView(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
=== modified file 'tests/autopilot/calendar_app/tests/test_monthview.py'
--- tests/autopilot/calendar_app/tests/test_monthview.py 2014-09-04 16:04:37 +0000
+++ tests/autopilot/calendar_app/tests/test_monthview.py 2015-03-01 14:08:04 +0000
@@ -25,7 +25,7 @@
from calendar_app.tests import CalendarAppTestCase
-from datetime import datetime
+import datetime
from dateutil.relativedelta import relativedelta
@@ -96,3 +96,17 @@
def test_monthview_go_to_today_prev_year(self):
self._go_to_today(-12)
+
+ def test_current_day_month_and_year_is_selected(self):
+ """By default, the day view shows the current month and year."""
+ now = datetime.datetime.now()
+ expected_month_name_year = now.strftime("%B %Y")
+
+ self.assertThat(self.app.main_view.get_month_year(self.month_view),
+ Equals(expected_month_name_year))
+
+ expected_day = str(int(now.strftime("%d")))
+ selected_day = self.month_view.get_current_selected_day()[0]
+
+ self.assertThat(selected_day.select_single('Label').text,
+ Equals(expected_day))
Follow ups
-
[Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: noreply, 2015-03-07
-
[Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Carla Sella, 2015-03-07
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-03-06
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Nicholas Skaggs, 2015-03-06
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-03-05
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-03-05
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Carla Sella, 2015-03-05
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-03-03
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Carla Sella, 2015-03-03
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Carla Sella, 2015-03-03
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Nicholas Skaggs, 2015-03-03
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-03-01
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Ubuntu Phone Apps Jenkins Bot, 2015-03-01
-
Re: [Merge] lp:~carla-sella/ubuntu-calendar-app/current-day-month-year-selected into lp:ubuntu-calendar-app
From: Carla Sella, 2015-03-01