aboutsummaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorXavi Garcia Mena <xavi.garcia.mena@canonical.com>2016-03-17 11:04:53 +0100
committerXavi Garcia Mena <xavi.garcia.mena@canonical.com>2016-03-17 11:04:53 +0100
commit2acd4961a7e5af93f863503eca90f51d28e6603d (patch)
tree26e355f5d1c702dc8a2b9e67702ace213e9054ec /tests/integration
parent2269139ef937dfd92c39cef15b5385b0070c7883 (diff)
downloadayatana-indicator-sound-2acd4961a7e5af93f863503eca90f51d28e6603d.tar.gz
ayatana-indicator-sound-2acd4961a7e5af93f863503eca90f51d28e6603d.tar.bz2
ayatana-indicator-sound-2acd4961a7e5af93f863503eca90f51d28e6603d.zip
Added volume check to root icon test
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/test-indicator.cpp22
1 files changed, 22 insertions, 0 deletions
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);