diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual | 2 | ||||
-rw-r--r-- | tests/notification-fixture.h | 10 | ||||
-rw-r--r-- | tests/test-notification.cpp | 4 |
3 files changed, 7 insertions, 9 deletions
diff --git a/tests/manual b/tests/manual index d9e192c..cafc292 100644 --- a/tests/manual +++ b/tests/manual @@ -35,7 +35,7 @@ Test-case ayatana-indicator-datetime/new-alarm-wakeup <dt>Unplug the phone from any USB connection and put it to sleep</dt> <dd>Confirm that the alarm sounds on time even if the phone is asleep. (Note: if in doubt about sleep you can see in the syslog whether the device actually suspended or whether the suspend was aborted)</dd> <dd>Confirm that the screen comes on when the alarm is triggered.<dd> - <dd>[FIXME: No haptic support right now. Remove this comment after https://github.com/AyatanaIndicators/ayatana-indicator-datetime/issues/67 is resolved] If the device supports haptic feedback, confirm the alarm vibrates.</dd> + <dd>If the device supports haptic feedback, confirm the alarm vibrates.</dd> </dl> Test-case ayatana-indicator-datetime/disabled-alarms diff --git a/tests/notification-fixture.h b/tests/notification-fixture.h index acb3e63..2349bab 100644 --- a/tests/notification-fixture.h +++ b/tests/notification-fixture.h @@ -52,7 +52,7 @@ protected: static constexpr char const * NOTIFY_INTERFACE {"org.freedesktop.Notifications"}; static constexpr char const * NOTIFY_PATH {"/org/freedesktop/Notifications"}; - static constexpr char const * HAPTIC_METHOD_VIBRATE_PATTERN {"VibratePattern"}; + static constexpr char const * HAPTIC_METHOD_VIBRATE {"vibrate"}; static constexpr int SCREEN_COOKIE {8675309}; static constexpr char const * SCREEN_METHOD_KEEP_DISPLAY_ON {"keepDisplayOn"}; @@ -279,8 +279,6 @@ protected: g_assert_no_error (error); dbus_test_service_add_task(service, DBUS_TEST_TASK(screen_mock)); - //TODO: Reimplement using hfd-service - /* /// /// Add the haptic mock /// @@ -292,13 +290,13 @@ protected: &error); dbus_test_dbus_mock_object_add_method(haptic_mock, haptic_obj, - HAPTIC_METHOD_VIBRATE_PATTERN, - G_VARIANT_TYPE("(auu)"), + HAPTIC_METHOD_VIBRATE, + G_VARIANT_TYPE("i"), nullptr, "", &error); g_assert_no_error (error); - dbus_test_service_add_task(service, DBUS_TEST_TASK(haptic_mock));*/ + dbus_test_service_add_task(service, DBUS_TEST_TASK(haptic_mock)); startDbusMock(); } diff --git a/tests/test-notification.cpp b/tests/test-notification.cpp index 80eb04c..7dccb96 100644 --- a/tests/test-notification.cpp +++ b/tests/test-notification.cpp @@ -158,9 +158,9 @@ TEST_F(NotificationFixture,Notification) // confirm that the vibration was as expected if (expected_vibrate_called) { - EXPECT_METHOD_CALLED_EVENTUALLY(haptic_mock, haptic_obj, HAPTIC_METHOD_VIBRATE_PATTERN); + EXPECT_METHOD_CALLED_EVENTUALLY(haptic_mock, haptic_obj, HAPTIC_METHOD_VIBRATE); } else { - EXPECT_METHOD_NOT_CALLED_EVENTUALLY(haptic_mock, haptic_obj, HAPTIC_METHOD_VIBRATE_PATTERN); + EXPECT_METHOD_NOT_CALLED_EVENTUALLY(haptic_mock, haptic_obj, HAPTIC_METHOD_VIBRATE); } // confirm that the notification was as expected |