aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-09-10 11:42:07 +0200
committerRobert Tari <robert@tari.in>2021-09-10 11:42:07 +0200
commitca9dbe4b4ea579596ceeaa8a3c5c817c66b1d40a (patch)
treeb59701ffc8b4cc03b315ba389c671342d34caa9a
parent3b90788d37977480049abaec7dc35c6ae0c3ce39 (diff)
downloadayatana-indicator-datetime-ca9dbe4b4ea579596ceeaa8a3c5c817c66b1d40a.tar.gz
ayatana-indicator-datetime-ca9dbe4b4ea579596ceeaa8a3c5c817c66b1d40a.tar.bz2
ayatana-indicator-datetime-ca9dbe4b4ea579596ceeaa8a3c5c817c66b1d40a.zip
tests/test-live-actions: Handle case when the test is run on Lomiri
-rw-r--r--tests/test-live-actions.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/test-live-actions.cpp b/tests/test-live-actions.cpp
index 403aeef..50444fa 100644
--- a/tests/test-live-actions.cpp
+++ b/tests/test-live-actions.cpp
@@ -113,12 +113,24 @@ TEST_F(TestLiveActionsFixture, SetLocation)
TEST_F(TestLiveActionsFixture, DesktopOpenAlarmApp)
{
std::string sReturn = m_actions->open_alarm_app();
- const std::string expected = "evolution -c calendar";
+ std::string expected = "evolution -c calendar";
+
+ if (ayatana_common_utils_is_lomiri())
+ {
+ expected = "alarm://";
+ }
+
EXPECT_EQ(expected, sReturn);
}
TEST_F(TestLiveActionsFixture, DesktopOpenAppointment)
{
+ if (ayatana_common_utils_is_lomiri())
+ {
+ // PhoneOpenAppointment will handle this
+ return;
+ }
+
Appointment a;
a.uid = "some-uid";
a.begin = DateTime::NowLocal();
@@ -129,6 +141,12 @@ TEST_F(TestLiveActionsFixture, DesktopOpenAppointment)
TEST_F(TestLiveActionsFixture, DesktopOpenCalendarApp)
{
+ if (ayatana_common_utils_is_lomiri())
+ {
+ // PhoneOpenCalendarApp will handle this
+ return;
+ }
+
std::string sReturn = m_actions->open_calendar_app(DateTime::NowLocal());
const std::string expected_substr = "evolution \"calendar:///?startdate=";
EXPECT_NE(sReturn.find(expected_substr), std::string::npos);
@@ -147,6 +165,10 @@ TEST_F(TestLiveActionsFixture, DesktopOpenSettingsApp)
{
expected_substr = "mate-time-admin";
}
+ else if (ayatana_common_utils_is_lomiri())
+ {
+ expected_substr = "settings:///system/time-date";
+ }
EXPECT_EQ(expected_substr, sReturn);
}