Merge lp:~canonical-platform-qa/ubuntu-rssreader-app/fix-bug-1456788 into lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk

Proposed by Sergio Cazzolato
Status: Needs review
Proposed branch: lp:~canonical-platform-qa/ubuntu-rssreader-app/fix-bug-1456788
Merge into: lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk
Diff against target: 128 lines (+25/-65)
1 file modified
tests/autopilot/shorts_app/__init__.py (+25/-65)
To merge this branch: bzr merge lp:~canonical-platform-qa/ubuntu-rssreader-app/fix-bug-1456788
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing
Ubuntu Shorts Developers Pending
Review via email: mp+259542@code.launchpad.net

Commit message

In this fix the class of the popover element is modified and some small refactors to keeps the tests that are failing more readable are implemented

To post a comment you must log in.
389. By Sergio Cazzolato

Removing the s in the verbs of the method doc

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

389. By Sergio Cazzolato

Removing the s in the verbs of the method doc

388. By Sergio Cazzolato

In this fix the class of the popover element is modified and some small refactors to keeps the tests that are failing more redable are implemented

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/shorts_app/__init__.py'
2--- tests/autopilot/shorts_app/__init__.py 2015-01-29 21:26:34 +0000
3+++ tests/autopilot/shorts_app/__init__.py 2015-05-19 20:52:51 +0000
4@@ -56,21 +56,10 @@
5 TopicManagement, objectName='topicmanagement')
6
7 def _click_add_reads(self):
8- # does not work using workaround
9- # header = self.get_header()
10- # header.click_action_button('Add feeds')
11-
12- # -------------------------------------------------------------------
13- # this will have to bee removed after fixing above header issue
14- actionsButton = self.wait_select_single(
15- "PageHeadButton", objectName='actions_overflow_button')
16- self.pointing_device.click_object(actionsButton)
17- popover = self.wait_select_single(
18- "StyledItem", objectName="popover_foreground")
19- addReadsAction = popover.wait_select_single(
20+ popover = self._open_popover()
21+ add_reads_action = popover.wait_select_single(
22 "AbstractButton", text="Add feeds")
23- self.pointing_device.click_object(addReadsAction)
24- # -----------------------------------------------------------------
25+ self.pointing_device.click_object(add_reads_action)
26
27 def get_selected_tab_title(self):
28 tabs = self.get_tabs()
29@@ -212,8 +201,8 @@
30 self.pointing_device.click_object(feed_in_feeedlist)
31
32 def _get_feed_in_feedlist(self, topic, feed):
33- itemList = self._get_feedlist(topic)
34- for item in itemList:
35+ item_list = self._get_feedlist(topic)
36+ for item in item_list:
37 label = item.select_single("Label", objectName="labelFeedname")
38 if label.text == feed:
39 return item
40@@ -248,68 +237,39 @@
41 if you are not in list mode it equals "isNotListMode"
42
43 """
44-
45- # does not work using workaround
46- """
47- header = self.get_header()
48- if mode == "isListMode":
49- header.click_action_button("Grid View")
50- else:
51- header.click_action_button("List view")
52- """
53- # -------------------------------------------------------------------
54- # this will have to bee removed after fixing above header issue
55- actionsButton = self.wait_select_single(
56- "PageHeadButton", objectName='actions_overflow_button')
57- self.pointing_device.click_object(actionsButton)
58- popover = self.wait_select_single(
59- "StyledItem", objectName="popover_foreground")
60- if mode == "isListMode":
61- addReadsAction = popover.wait_select_single(
62+ popover = self._open_popover()
63+ if mode == "isListMode":
64+ add_rads_action = popover.wait_select_single(
65 "AbstractButton", text="Grid View")
66 else:
67- addReadsAction = popover.wait_select_single(
68+ add_rads_action = popover.wait_select_single(
69 "AbstractButton", text="List view")
70
71- self.pointing_device.click_object(addReadsAction)
72- # -----------------------------------------------------------------
73+ self.pointing_device.click_object(add_rads_action)
74
75 @autopilot_logging.log_action(logger.info)
76 def click_edit_topics_in_header(self):
77- """
78- does not work using workaround
79- header = self.get_header()
80- header.click_action_button('editTopicsAction')
81- """
82- # -------------------------------------------------------------------
83- # this will have to bee removed after fixing above header issue
84- # reported bug #1412967 -- 20/01/2015
85- actionsButton = self.wait_select_single(
86- "PageHeadButton", objectName='actions_overflow_button')
87- self.pointing_device.click_object(actionsButton)
88- popover = self.wait_select_single(
89- "StyledItem", objectName="popover_foreground")
90- addReadsAction = popover.wait_select_single(
91+ popover = self._open_popover()
92+ add_reads_action = popover.wait_select_single(
93 "AbstractButton", text="Edit topics")
94
95- self.pointing_device.click_object(addReadsAction)
96- # -----------------------------------------------------------------
97+ self.pointing_device.click_object(add_reads_action)
98
99 @autopilot_logging.log_action(logger.info)
100 def click_header_done_button(self):
101- """
102- does not work using workaround
103-
104- header = self.get_header()
105- header.click_action_button("doneButton")
106-
107- """
108- # -------------------------------------------------------------------
109- # this will have to bee removed after fixing above header issue
110- # reported bug #1412967 -- 20/01/2015
111- actionsButton = self.wait_select_single(
112+ actions_button = self.wait_select_single(
113 "PageHeadButton", objectName='doneButton_header_button')
114- self.pointing_device.click_object(actionsButton)
115+ self.pointing_device.click_object(actions_button)
116+
117+ @autopilot_logging.log_action(logger.info)
118+ def _open_popover(self):
119+ """Open the popover and return the object"""
120+
121+ actions_button = self.wait_select_single(
122+ "PageHeadButton", objectName='actions_overflow_button')
123+ self.pointing_device.click_object(actions_button)
124+ return self.wait_select_single(
125+ "UCStyledItemBase", objectName="popover_foreground")
126
127
128 class Page(toolkit_emulators.MainView):

Subscribers

People subscribed via source and target branches