~nik90/ubuntu-clock-app/remove-timer-hour

« back to all changes in this revision

Viewing changes to tests/autopilot/ubuntu_clock_app/emulators.py

  • Committer: Tarmac
  • Author(s): Nekhelesh Ramananthan
  • Date: 2013-09-03 20:06:28 UTC
  • mfrom: (162.1.32 new-preset-designs)
  • Revision ID: tarmac-20130903200628-6av41y068sff29fe
Implemented the new timer preset designs. Fixes: https://bugs.launchpad.net/bugs/1169182, https://bugs.launchpad.net/bugs/1209024, https://bugs.launchpad.net/bugs/1219770.

Approved by Ubuntu Phone Apps Jenkins Bot, Nicholas Skaggs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
 
20
20
class MainView(toolkit_emulators.MainView):
21
 
    def get_stopwatch_tab_button(self):
22
 
        """Returns the stopwatch tab."""
23
 
        return self.select_single("AbstractButton", buttonIndex=3)
24
 
 
25
21
    def get_stopwatch_label(self):
26
22
        """Returns the select for the stopwatch label"""
27
23
        return self.select_single("Label", objectName="labelStopwatch")
42
38
        """Returns the select for the lap count"""
43
39
        return self.select_single("ListModel", objectName="laps")
44
40
 
45
 
    def get_timer_tab_button(self):
46
 
        """Returns the timer tab."""
47
 
        return self.select_single("AbstractButton", buttonIndex=2)
48
 
 
49
41
    def get_toolbar_timer(self):
50
42
        """Returns the toolbar of timer tab"""
51
43
        return self.select_single("ToolbarItems")
58
50
 
59
51
    def get_toolbar_timer_add_preset_button(self):
60
52
        """Returns the button for add preset of toolbar of timer tab"""
61
 
        return self.get_toolbar_timer_button(1)
 
53
        return self.select_single('ActionItem', objectName="addPresetButton")
 
54
 
 
55
    def get_toolbar_timer_save_preset_button(self):
 
56
        """Returns the button for add preset of toolbar of timer tab"""
 
57
        return self.select_single("ActionItem", objectName="savePresetButton")
62
58
 
63
59
    def get_timer_name_preset(self):
64
60
        """Returns the TextField where insert the name of the preset"""
68
64
        """Returns the hour hand of clock in timer tab"""
69
65
        return self.select_single("AnalogTouchHand", objectName="hourHand")
70
66
 
71
 
    def get_timer_clock_center_label(self):
72
 
        """Returns the label in the center of clock"""
73
 
        return self.select_single("Label", objectName="addPresetTextDone")
74
 
 
75
67
    def get_preset_label_text(self):
76
68
        """Returns the label with the preset text"""
77
69
        preset = self.select_many("Label", objectName="presetTextLabel")