From 217b48352a2591150413c77ca85b6a1ef158e6d5 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Fri, 16 Jul 2021 21:52:08 +0200 Subject: Fix failing tests - include/actions-mock.h: Set return value to std::string and return an empty string - include/actions.h: Make open_alarm_app, open_appointment, open_calendar_app and open_settings_app return the uri/command - include/actions-live.h: Make open_alarm_app, open_appointment, open_calendar_app and open_settings_app return the uri/command - src/actions-live.cpp: Make open_alarm_app, open_appointment, open_calendar_app and open_settings_app return the uri/command - tests/test-live-actions.cpp: Drop last_cmd and last_url variables + use return values of actions-live functions for testing + test phone functions on lomiri only - tests/test-live-actions.cpp: test phone functions after setting XDG_CURRENT_DESKTOP - tests/test-settings.cpp: Use SETTINGS_NOTIFY_SCHEMA_ID only if it exists - tests/run-eds-ics-test.sh: Remove return statement - tests/CMakeLists.txt: Enable the timezone unit tests - tests/CMakeLists.txt: Catch race condition while attempting to copy schemas - tests/CMakeLists.txt: Exclude blocking tests on Travis for now - tests/tests-timezones.cpp: Use MockTimezone to construct LiveTimezones + drop section expecting changes after /timezone is modified (not monitored) - tests/test-formater: Change warning to plain message otherwise it can crash the test - .build.yml: Replace libmessaging-menu-dev with ayatana-indicator-messages Git build --- tests/actions-mock.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'tests/actions-mock.h') diff --git a/tests/actions-mock.h b/tests/actions-mock.h index a02a7e2..8de1357 100644 --- a/tests/actions-mock.h +++ b/tests/actions-mock.h @@ -50,20 +50,28 @@ public: bool desktop_has_calendar_app() const { return m_desktop_has_calendar_app; } - void open_alarm_app() { + std::string open_alarm_app() { m_history.push_back(OpenAlarmApp); + + return ""; } - void open_appointment(const Appointment& appt, const DateTime& dt) { + std::string open_appointment(const Appointment& appt, const DateTime& dt) { m_appt = appt; m_date_time = dt; m_history.push_back(OpenAppt); + + return ""; } - void open_calendar_app(const DateTime& dt) { + std::string open_calendar_app(const DateTime& dt) { m_date_time = dt; m_history.push_back(OpenCalendarApp); + + return ""; } - void open_settings_app() { + std::string open_settings_app() { m_history.push_back(OpenSettingsApp); + + return ""; } void set_location(const std::string& zone_, const std::string& name_) { -- cgit v1.2.3