From 2acd4961a7e5af93f863503eca90f51d28e6603d Mon Sep 17 00:00:00 2001 From: Xavi Garcia Mena Date: Thu, 17 Mar 2016 11:04:53 +0100 Subject: Added volume check to root icon test --- tests/integration/test-indicator.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests') diff --git a/tests/integration/test-indicator.cpp b/tests/integration/test-indicator.cpp index fb62d4e..bb08c40 100644 --- a/tests/integration/test-indicator.cpp +++ b/tests/integration/test-indicator.cpp @@ -46,6 +46,28 @@ TEST_F(TestIndicator, PhoneCheckRootIcon) // start now the indicator, so it picks the new volumes ASSERT_NO_THROW(startIndicator()); + // check that the volume is set and give + // time to the indicator to start + EXPECT_MATCHRESULT(mh::MenuMatcher(phoneParameters()) + .item(mh::MenuItemMatcher() + .action("indicator.root") + .string_attribute("x-canonical-type", "com.canonical.indicator.root") + .string_attribute("x-canonical-scroll-action", "indicator.scroll") + .string_attribute("x-canonical-secondary-action", "indicator.mute") + .string_attribute("submenu-action", "indicator.indicator-shown") + .mode(mh::MenuItemMatcher::Mode::all) + .submenu() + .item(mh::MenuItemMatcher() + .section() + .item(silentModeSwitch(false)) + .item(volumeSlider(INITIAL_VOLUME, "Volume")) + ) + .item(mh::MenuItemMatcher() + .label("Sound Settingsā€¦") + .action("indicator.phone-settings") + ) + ).match()); + QStringList mutedIcon = {"audio-volume-muted-panel", "audio-volume-muted", "audio-volume", "audio"}; EXPECT_EQ(getRootIconValue(), mutedIcon); -- cgit v1.2.3