aboutsummaryrefslogtreecommitdiff
path: root/tests/integration/test-indicator.cpp
diff options
context:
space:
mode:
authorXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-10-26 12:01:16 +0100
committerXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-10-26 12:01:16 +0100
commit698baf72cd6a606d9c8101c31e0d40b38d48a8bb (patch)
tree93c3ffbc9bb122892981cd79e7ee875cb2a2e883 /tests/integration/test-indicator.cpp
parentdc719904611197a1f01fc4034f4678ffae556491 (diff)
downloadayatana-indicator-sound-698baf72cd6a606d9c8101c31e0d40b38d48a8bb.tar.gz
ayatana-indicator-sound-698baf72cd6a606d9c8101c31e0d40b38d48a8bb.tar.bz2
ayatana-indicator-sound-698baf72cd6a606d9c8101c31e0d40b38d48a8bb.zip
Changed unit test to wait for the indicator to connect the user accounts
Diffstat (limited to 'tests/integration/test-indicator.cpp')
-rw-r--r--tests/integration/test-indicator.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/integration/test-indicator.cpp b/tests/integration/test-indicator.cpp
index e79c9d4..d55222b 100644
--- a/tests/integration/test-indicator.cpp
+++ b/tests/integration/test-indicator.cpp
@@ -32,7 +32,7 @@ class TestIndicator: public IndicatorSoundTestBase
{
};
-TEST_F(TestIndicator, DISABLED_PhoneChangeRoleVolume)
+TEST_F(TestIndicator, PhoneChangeRoleVolume)
{
double INITIAL_VOLUME = 0.0;
@@ -55,9 +55,7 @@ TEST_F(TestIndicator, DISABLED_PhoneChangeRoleVolume)
QSignalSpy &userAccountsSpy = *signal_spy_volume_changed_;
// set an initial volume to the alert role
userAccountsSpy.clear();
- setStreamRestoreVolume("alert", 1.0);
- WAIT_AT_LEAST_SIGNALS(userAccountsSpy, 1);
-
+ EXPECT_TRUE(setVolumeUntilAccountsIsConnected(1.0));
userAccountsSpy.clear();
// play a test sound, it should change the role in the indicator
EXPECT_TRUE(startTestSound("multimedia"));
@@ -69,7 +67,7 @@ TEST_F(TestIndicator, DISABLED_PhoneChangeRoleVolume)
userAccountsSpy.clear();
// set the random volume to the multimedia role
- EXPECT_TRUE(setStreamRestoreVolume("multimedia", randomVolume));
+ setActionValue("volume", QVariant::fromValue(randomVolume));
if (randomVolume != INITIAL_VOLUME)
{
WAIT_FOR_SIGNALS(userAccountsSpy, 1);