~ken-vandine/ubuntu-system-settings/fix-1363400

« back to all changes in this revision

Viewing changes to tests/autopilot/ubuntu_system_settings/tests/test_sound.py

  • Committer: CI Train Bot
  • Author(s): Ted Gould
  • Date: 2015-01-06 21:40:27 UTC
  • mfrom: (926.124.24 silent-mode-action)
  • Revision ID: ci_train_bot_citrain_user@canonical.com-20150106214027-9g6t4a9fktz3dr3o
Make silent mode use the action state in the sound user service Fixes: #1382089, #1388804, #1395709
Approved by: Ken VanDine

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        """ Check that silent_mode is present and clickable"""
32
32
        snd = self.system_settings.main_view.sound_page.select_single(
33
33
            objectName="silentMode")
34
 
        prev_value = self.obj_test.GetSilentMode()
35
 
        self.system_settings.main_view.scroll_to_and_click(snd)
36
 
        sleep(0.2)
37
 
        self.assertNotEqual(
38
 
            self.obj_test.GetSilentMode(),
39
 
            prev_value)
40
 
 
41
 
    def test_silent_mode_warning(self):
42
 
        """ Check that silent_mode warning is shown"""
43
 
        sndwarn = self.system_settings.main_view.sound_page.select_single(
44
 
            objectName="silentModeWarning")
45
 
        snd = self.system_settings.main_view.sound_page.select_single(
46
 
            objectName="silentMode")
47
 
        self.system_settings.main_view.scroll_to_and_click(snd)
48
 
        sleep(0.2)
49
 
        self.assertThat(
50
 
            sndwarn.get_properties()["visible"],
51
 
            Eventually(Equals(True)))
 
34
        self.system_settings.main_view.scroll_to_and_click(snd)
 
35
        sleep(0.2)
 
36
        calls = self.dbus_mock_isound.GetCalls()
 
37
        self.assertThat(
 
38
            calls[0][1],
 
39
            Equals('Activate')
 
40
        )
 
41
        self.assertThat(
 
42
            calls[0][2][0],
 
43
            Equals('silent-mode')
 
44
        )
52
45
 
53
46
    def test_call_vibrate_sound_switch(self):
54
47
        """ Check that call vibrate is present and clickable"""