From 698baf72cd6a606d9c8101c31e0d40b38d48a8bb Mon Sep 17 00:00:00 2001 From: Xavi Garcia Mena Date: Mon, 26 Oct 2015 12:01:16 +0100 Subject: Changed unit test to wait for the indicator to connect the user accounts --- tests/integration/test-indicator.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests/integration/test-indicator.cpp') 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); -- cgit v1.2.3