Merge lp:~elopio/ubuntu-rssreader-app/autopilot-1.4 into lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk

Proposed by Thomi Richards
Status: Merged
Approved by: Francis Ginther
Approved revision: 134
Merged at revision: 136
Proposed branch: lp:~elopio/ubuntu-rssreader-app/autopilot-1.4
Merge into: lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk
Diff against target: 154 lines (+20/-39)
3 files modified
tests/autopilot/ubuntu_rssreader_app/emulators.py (+8/-32)
tests/autopilot/ubuntu_rssreader_app/tests/__init__.py (+7/-3)
tests/autopilot/ubuntu_rssreader_app/tests/test_rssreader.py (+5/-4)
To merge this branch: bzr merge lp:~elopio/ubuntu-rssreader-app/autopilot-1.4
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ubuntu Shorts Developers Pending
Thomi Richards Pending
Review via email: mp+194058@code.launchpad.net

Commit message

Port to autopilot 1.4.

Description of the change

With the prerequisite branch, now all three tests pass.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

FAILED: Autolanding.
No commit message was specified in the merge proposal. Hit 'Add commit message' on the merge proposal web page or follow the link below. You can approve the merge proposal yourself to rerun.
https://code.launchpad.net/~elopio/ubuntu-rssreader-app/autopilot-1.4/+merge/194058/+edit-commit-message

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) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/ubuntu_rssreader_app/emulators.py'
--- tests/autopilot/ubuntu_rssreader_app/emulators.py 2013-11-05 01:43:54 +0000
+++ tests/autopilot/ubuntu_rssreader_app/emulators.py 2013-11-06 03:51:49 +0000
@@ -33,30 +33,6 @@
33 requested = action33 requested = action
34 self.pointing_device.click_object(requested)34 self.pointing_device.click_object(requested)
3535
36 def select_single_retry(self, object_type, **kwargs):
37 """Returns the item that is searched for with app.select_single
38 In case of the item was not found (not created yet) a second attempt is
39 taken 1 second later."""
40 item = self.select_single(object_type, **kwargs)
41 tries = 10
42 while item is None and tries > 0:
43 sleep(self.retry_delay)
44 item = self.select_single(object_type, **kwargs)
45 tries = tries - 1
46 return item
47
48 def select_many_retry(self, object_type, **kwargs):
49 """Returns the item that is searched for with app.select_many
50 In case of no item was not found (not created yet) a second attempt is
51 taken 1 second later"""
52 items = self.select_many(object_type, **kwargs)
53 tries = 10
54 while len(items) < 1 and tries > 0:
55 sleep(self.retry_delay)
56 items = self.select_many(object_type, **kwargs)
57 tries = tries - 1
58 return items
59
60 def get_action_popover(self):36 def get_action_popover(self):
61 # Returns all instances, but with current one as first index37 # Returns all instances, but with current one as first index
62 return self.select_many("ActionSelectionPopover")[0]38 return self.select_many("ActionSelectionPopover")[0]
@@ -85,7 +61,7 @@
8561
86 #### feed list page objects62 #### feed list page objects
87 def get_feedlist_topic(self, name):63 def get_feedlist_topic(self, name):
88 return self.select_single_retry("TopicComponent", topicName=name)64 return self.wait_select_single("TopicComponent", topicName=name)
8965
90 def get_feedlist_feed(self, feed):66 def get_feedlist_feed(self, feed):
91 return self.select_single("FeedComponent", text=feed)67 return self.select_single("FeedComponent", text=feed)
@@ -107,7 +83,7 @@
107 objectName="choosetopicpage")83 objectName="choosetopicpage")
10884
109 def get_feedlist_page(self):85 def get_feedlist_page(self):
110 return self.select_single_retry("FeedListPage",86 return self.wait_select_single("FeedListPage",
111 objectName="feedlistpage")87 objectName="feedlistpage")
11288
113 def get_articlelist_page(self):89 def get_articlelist_page(self):
@@ -115,7 +91,7 @@
115 objectName="articlelistpage")91 objectName="articlelistpage")
11692
117 def get_feed_management_page(self):93 def get_feed_management_page(self):
118 return self.select_single_retry("TopicManagement",94 return self.wait_select_single("TopicManagement",
119 objectName="topicmanagement")95 objectName="topicmanagement")
12096
121 def get_edit_feed_page(self):97 def get_edit_feed_page(self):
@@ -126,7 +102,7 @@
126 return self.select_single("ManageTopicsPage")102 return self.select_single("ManageTopicsPage")
127103
128 def get_rss_feed_page(self):104 def get_rss_feed_page(self):
129 return self.select_single_retry(105 return self.wait_select_single(
130 "RssFeedPage", objectName="rssfeedpage")106 "RssFeedPage", objectName="rssfeedpage")
131107
132 def get_topics(self):108 def get_topics(self):
@@ -165,14 +141,14 @@
165 return self.select_single("ActionItem", text="Back")141 return self.select_single("ActionItem", text="Back")
166142
167 def get_editfeed_done_button(self):143 def get_editfeed_done_button(self):
168 return self.select_single_retry("Button", objectName="doneButton")144 return self.wait_select_single("Button", objectName="doneButton")
169145
170 def get_activityIndicator(self):146 def get_activityIndicator(self):
171 return self.select_single_retry(147 return self.wait_select_single(
172 "ActivityIndicator", objectName="activityindicator")148 "ActivityIndicator", objectName="activityindicator")
173149
174 def get_topic_tab(self, topic):150 def get_topic_tab(self, topic):
175 return self.select_single_retry("TopicTab", title=topic)151 return self.wait_select_single("TopicTab", title=topic)
176152
177 def get_feed_in_feedlist(self, topic, feed):153 def get_feed_in_feedlist(self, topic, feed):
178 tab = self.get_topic_tab(topic)154 tab = self.get_topic_tab(topic)
@@ -183,7 +159,7 @@
183 return item159 return item
184160
185 def get_editfeed_topic_valueselector(self):161 def get_editfeed_topic_valueselector(self):
186 return self.select_single_retry(162 return self.wait_select_single(
187 "ValueSelector", objectName="valueselector")163 "ValueSelector", objectName="valueselector")
188164
189 def get_editfeed_valueselector_value(self, name):165 def get_editfeed_valueselector_value(self, name):
190166
=== modified file 'tests/autopilot/ubuntu_rssreader_app/tests/__init__.py'
--- tests/autopilot/ubuntu_rssreader_app/tests/__init__.py 2013-10-07 12:49:31 +0000
+++ tests/autopilot/ubuntu_rssreader_app/tests/__init__.py 2013-11-06 03:51:49 +0000
@@ -28,7 +28,11 @@
28from autopilot.platform import model28from autopilot.platform import model
29from autopilot.testcase import AutopilotTestCase29from autopilot.testcase import AutopilotTestCase
3030
31from ubuntuuitoolkit import emulators as toolkit_emulators31from ubuntuuitoolkit import (
32 base,
33 emulators as toolkit_emulators
34)
35
32from ubuntu_rssreader_app import emulators36from ubuntu_rssreader_app import emulators
3337
34logger = logging.getLogger(__name__)38logger = logging.getLogger(__name__)
@@ -74,14 +78,14 @@
7478
75 def launch_test_local(self):79 def launch_test_local(self):
76 self.app = self.launch_test_application(80 self.app = self.launch_test_application(
77 "qmlscene",81 base.get_qmlscene_launch_command(),
78 self.local_location,82 self.local_location,
79 app_type='qt',83 app_type='qt',
80 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)84 emulator_base=toolkit_emulators.UbuntuUIToolkitEmulatorBase)
8185
82 def launch_test_installed(self):86 def launch_test_installed(self):
83 self.app = self.launch_test_application(87 self.app = self.launch_test_application(
84 "qmlscene",88 base.get_qmlscene_launch_command(),
85 self.installed_location,89 self.installed_location,
86 "--desktop_file_hint=/usr/share/applications/"90 "--desktop_file_hint=/usr/share/applications/"
87 "rssreader-app.desktop",91 "rssreader-app.desktop",
8892
=== modified file 'tests/autopilot/ubuntu_rssreader_app/tests/test_rssreader.py'
--- tests/autopilot/ubuntu_rssreader_app/tests/test_rssreader.py 2013-11-05 02:14:35 +0000
+++ tests/autopilot/ubuntu_rssreader_app/tests/test_rssreader.py 2013-11-06 03:51:49 +0000
@@ -145,13 +145,14 @@
145145
146 #check topic146 #check topic
147 logger.debug("assert topic remains")147 logger.debug("assert topic remains")
148 self.assertThat(lambda: self.main_view.get_feedlist_topic(topicName),148 # If the topic is not present, it will raise an error.
149 Eventually(Not(Is(None))))149 self.main_view.get_feedlist_topic(topicName)
150150
151 #check feed has been removed151 #check feed has been removed
152 logger.debug("assert removed feed")152 logger.debug("assert removed feed")
153 self.assertThat(lambda: self.main_view.get_feedlist_feed(feedName),153 self.assertThat(
154 Eventually(Equals(None)))154 lambda: self.main_view.select_many('FeedComponent', text=feedName),
155 Eventually(Equals([])))
155156
156 def _remove_topic(self, topicName):157 def _remove_topic(self, topicName):
157 self.assertThat(self.main_view.get_topics_page,158 self.assertThat(self.main_view.get_topics_page,

Subscribers

People subscribed via source and target branches