aboutsummaryrefslogtreecommitdiff
path: root/tests/integration/indicator-sound-test-base.h
diff options
context:
space:
mode:
authorXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-10-13 09:49:55 +0200
committerXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-10-13 09:49:55 +0200
commit828fae630464f2eae96145cffcf97e5791497264 (patch)
tree1f6050d65ac9ef0f251506c2abcb9a561c9a832c /tests/integration/indicator-sound-test-base.h
parent8402eadfcbd96b753f7cf2402956c100812de54e (diff)
downloadayatana-indicator-sound-828fae630464f2eae96145cffcf97e5791497264.tar.gz
ayatana-indicator-sound-828fae630464f2eae96145cffcf97e5791497264.tar.bz2
ayatana-indicator-sound-828fae630464f2eae96145cffcf97e5791497264.zip
Added notifications tests integrated with the test instance of pulseAudio and gmenuharness
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;