aboutsummaryrefslogtreecommitdiff
path: root/tests/integration/indicator-sound-test-base.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/indicator-sound-test-base.h')
-rw-r--r--tests/integration/indicator-sound-test-base.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/integration/indicator-sound-test-base.h b/tests/integration/indicator-sound-test-base.h
index 0dc0052..20e44fc 100644
--- a/tests/integration/indicator-sound-test-base.h
+++ b/tests/integration/indicator-sound-test-base.h
@@ -33,6 +33,15 @@ class DBusPulseVolume;
class DBusPropertiesInterface;
class QSignalSpy;
+#define WAIT_FOR_SIGNALS(signalSpy, signalsExpected)\
+{\
+ while (signalSpy.size() < signalsExpected)\
+ {\
+ ASSERT_TRUE(signalSpy.wait());\
+ }\
+ ASSERT_EQ(signalsExpected, signalSpy.size());\
+}
+
class IndicatorSoundTestBase: public testing::Test
{
public:
@@ -81,6 +90,26 @@ protected:
void initializeAccountsInterface();
+ OrgFreedesktopDBusMockInterface& notificationsMockInterface();
+
+ bool setActionValue(const QString & action, QVariant value);
+
+ bool pressNotificationButton(int id, const QString & button);
+
+ bool qDBusArgumentToMap(QVariant const& variant, QVariantMap& map);
+
+ void checkVolumeNotification(double volume, QString const& label, bool isLoud, QVariantList call);
+
+ void checkHighVolumeNotification(QVariantList call);
+
+ void checkCloseNotification(int id, QVariantList call);
+
+ void checkNotificationWithNoArgs(QString const& method, QVariantList call);
+
+ int getNotificationID(QVariantList call);
+
+ bool activateHeadphones(bool headphonesActive);
+
QtDBusTest::DBusTestRunner dbusTestRunner;
QtDBusMock::DBusMock dbusMock;