diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual | 10 | ||||
-rw-r--r-- | tests/manual-test-snap.cpp | 2 | ||||
-rw-r--r-- | tests/test-actions.cpp | 4 | ||||
-rw-r--r-- | tests/test-alarm-queue.cpp | 4 | ||||
-rw-r--r-- | tests/test-live-actions.cpp | 4 | ||||
-rw-r--r-- | tests/test-menus.cpp | 8 | ||||
-rw-r--r-- | tests/test-snap.cpp | 2 |
7 files changed, 22 insertions, 12 deletions
diff --git a/tests/manual b/tests/manual index b14a061..2062fd1 100644 --- a/tests/manual +++ b/tests/manual @@ -38,6 +38,16 @@ Test-case indicator-datetime/new-alarm-wakeup <dd>If the device supports haptic feedback, confirm the alarm vibrates.</dd> </dl> +Test-case indicator-datetime/disabled-alarms +<dl> + <dt>Create and save an upcoming alarm in ubuntu-clock-app</dt> + <dd>Confirm that the alarm icon appears next to the current time in unity's indicator display</dd> + <dt>Disable the alarm in ubuntu-clock-app</dt> + <dd>When all alarms are disabled or removed, the alarm icon should disappear.</dd> + <dt>Re-enable the alarm in ubuntu-clock-app</dt> + <dd>When the alarm is enabled, the alarm icon should reappear.</dd> +</dl> + Test-case indicator-datetime/alarm-timezone <dl> <dt>In ubuntu-system-settings, change your timezone to a zone you're not in</dt> diff --git a/tests/manual-test-snap.cpp b/tests/manual-test-snap.cpp index d4d9ec9..e0aad89 100644 --- a/tests/manual-test-snap.cpp +++ b/tests/manual-test-snap.cpp @@ -69,7 +69,7 @@ int main(int argc, const char* argv[]) a.summary = "Alarm"; a.url = "alarm:///hello-world"; a.uid = "D4B57D50247291478ED31DED17FF0A9838DED402"; - a.has_alarms = true; + a.type = Appointment::UBUNTU_ALARM; auto begin = g_date_time_new_local(2014,12,25,0,0,0); auto end = g_date_time_add_full(begin,0,0,1,0,0,-1); a.begin = begin; diff --git a/tests/test-actions.cpp b/tests/test-actions.cpp index aefeac0..fc89426 100644 --- a/tests/test-actions.cpp +++ b/tests/test-actions.cpp @@ -39,7 +39,7 @@ class ActionsFixture: public StateFixture a1.summary = "Alarm"; a1.summary = "http://www.example.com/"; a1.uid = "example"; - a1.has_alarms = true; + a1.type = Appointment::UBUNTU_ALARM; a1.begin = a1.end = tomorrow; Appointment a2; // a non-alarm appointment @@ -47,7 +47,7 @@ class ActionsFixture: public StateFixture a2.summary = "Other Text"; a2.summary = "http://www.monkey.com/"; a2.uid = "monkey"; - a2.has_alarms = false; + a1.type = Appointment::EVENT; a2.begin = a2.end = tomorrow; return std::vector<Appointment>({a1, a2}); diff --git a/tests/test-alarm-queue.cpp b/tests/test-alarm-queue.cpp index d2de8ac..12ffe92 100644 --- a/tests/test-alarm-queue.cpp +++ b/tests/test-alarm-queue.cpp @@ -80,7 +80,7 @@ protected: a1.summary = "Alarm"; a1.summary = "http://www.example.com/"; a1.uid = "example"; - a1.has_alarms = true; + a1.type = Appointment::UBUNTU_ALARM; a1.begin = tomorrow_begin; a1.end = tomorrow_end; @@ -92,7 +92,7 @@ protected: a2.summary = "Other Text"; a2.summary = "http://www.monkey.com/"; a2.uid = "monkey"; - a2.has_alarms = false; + a1.type = Appointment::EVENT; a2.begin = ubermorgen_begin; a2.end = ubermorgen_end; diff --git a/tests/test-live-actions.cpp b/tests/test-live-actions.cpp index 2cd6eef..1197e3e 100644 --- a/tests/test-live-actions.cpp +++ b/tests/test-live-actions.cpp @@ -312,11 +312,11 @@ TEST_F(LiveActionsFixture, PhoneOpenAppointment) a.uid = "some-uid"; a.begin = DateTime::NowLocal(); - a.has_alarms = false; + a.type = Appointment::EVENT; m_actions->phone_open_appointment(a); EXPECT_EQ(calendar_app_url, m_live_actions->last_url); - a.has_alarms = true; + a.type = Appointment::UBUNTU_ALARM; m_actions->phone_open_appointment(a); EXPECT_EQ(clock_app_url, m_live_actions->last_url); diff --git a/tests/test-menus.cpp b/tests/test-menus.cpp index 363a132..e0e63ac 100644 --- a/tests/test-menus.cpp +++ b/tests/test-menus.cpp @@ -191,7 +191,7 @@ private: a1.summary = "Alarm"; a1.summary = "http://www.example.com/"; a1.uid = "example"; - a1.has_alarms = true; + a1.type = Appointment::UBUNTU_ALARM; a1.begin = a1.end = tomorrow; Appointment a2; // a non-alarm appointment @@ -199,7 +199,7 @@ private: a2.summary = "Other Text"; a2.summary = "http://www.monkey.com/"; a2.uid = "monkey"; - a2.has_alarms = false; + a1.type = Appointment::EVENT; a2.begin = a2.end = tomorrow; return std::vector<Appointment>({a1, a2}); @@ -212,7 +212,7 @@ private: // confirm it has the right x-canonical-type gchar * str = nullptr; g_menu_model_get_item_attribute(section, index, "x-canonical-type", "s", &str); - if (appt.has_alarms) + if (appt.is_ubuntu_alarm()) EXPECT_STREQ("com.canonical.indicator.alarm", str); else EXPECT_STREQ("com.canonical.indicator.appointment", str); @@ -245,7 +245,7 @@ private: g_clear_pointer(&str, g_free); // confirm that alarms have an icon - if (appt.has_alarms) + if (appt.is_ubuntu_alarm()) { auto v = g_menu_model_get_item_attribute_value(section, index, diff --git a/tests/test-snap.cpp b/tests/test-snap.cpp index 21202f4..972c493 100644 --- a/tests/test-snap.cpp +++ b/tests/test-snap.cpp @@ -108,7 +108,7 @@ protected: appt.summary = "Alarm"; appt.url = "alarm:///hello-world"; appt.uid = "D4B57D50247291478ED31DED17FF0A9838DED402"; - appt.has_alarms = true; + appt.type = Appointment::EVENT; auto begin = g_date_time_new_local(2014,12,25,0,0,0); auto end = g_date_time_add_full(begin,0,0,1,0,0,-1); appt.begin = begin; |