From 1188fa25abc4b23650888f8745837df8549b73af Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 24 Nov 2014 20:50:05 -0600 Subject: Flesh out the menu tests --- tests/indicator-test.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/indicator-test.cc b/tests/indicator-test.cc index 336cfdb..a21209c 100644 --- a/tests/indicator-test.cc +++ b/tests/indicator-test.cc @@ -50,16 +50,29 @@ TEST_F(IndicatorTest, PhoneMenu) { EXPECT_MENU_ATTRIB({0}, "action", "indicator.root"); EXPECT_MENU_ATTRIB({0}, "x-canonical-type", "com.canonical.indicator.root"); + EXPECT_MENU_ATTRIB({0}, "x-canonical-scroll-action", "indicator.scroll"); + EXPECT_MENU_ATTRIB({0}, "x-canonical-secondary-action", "indicator.mute"); EXPECT_MENU_ATTRIB(std::vector({0, 0, 0}), "action", "indicator.silent-mode"); + EXPECT_MENU_ATTRIB(std::vector({0, 0, 0}), "label", "Silent Mode"); + + EXPECT_MENU_ATTRIB(std::vector({0, 2}), "action", "indicator.phone-settings"); + EXPECT_MENU_ATTRIB(std::vector({0, 2}), "label", "Sound Settingsā€¦"); } TEST_F(IndicatorTest, DesktopMenu) { setMenu("/com/canonical/indicator/sound/desktop"); EXPECT_MENU_ATTRIB({0}, "action", "indicator.root"); + EXPECT_MENU_ATTRIB({0}, "x-canonical-type", "com.canonical.indicator.root"); + EXPECT_MENU_ATTRIB({0}, "x-canonical-scroll-action", "indicator.scroll"); + EXPECT_MENU_ATTRIB({0}, "x-canonical-secondary-action", "indicator.mute"); EXPECT_MENU_ATTRIB(std::vector({0, 0, 0}), "action", "indicator.mute"); + EXPECT_MENU_ATTRIB(std::vector({0, 0, 0}), "label", "Mute"); + + EXPECT_MENU_ATTRIB(std::vector({0, 2}), "action", "indicator.desktop-settings"); + EXPECT_MENU_ATTRIB(std::vector({0, 2}), "label", "Sound Settingsā€¦"); } TEST_F(IndicatorTest, BaseActions) { -- cgit v1.2.3