Merge lp:~boiko/ubuntu-calculator-app/fix_1217981 into lp:~ubuntu-calculator-dev/ubuntu-calculator-app/old_trunk

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Francis Ginther
Approved revision: 144
Merged at revision: 144
Proposed branch: lp:~boiko/ubuntu-calculator-app/fix_1217981
Merge into: lp:~ubuntu-calculator-dev/ubuntu-calculator-app/old_trunk
Diff against target: 66 lines (+8/-7)
4 files modified
Simple/CalcLabel.qml (+1/-1)
Simple/Screen.qml (+1/-1)
tests/autopilot/ubuntu_calculator_app/emulators.py (+4/-0)
tests/autopilot/ubuntu_calculator_app/tests/test_simple_page.py (+2/-5)
To merge this branch: bzr merge lp:~boiko/ubuntu-calculator-app/fix_1217981
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Mihir Soni Approve
Riccardo Padovani Approve
Review via email: mp+182764@code.launchpad.net

Commit message

Fix the newly created tests for focusing and keyboard visibility.

Description of the change

Fix the newly created tests for focusing and keyboard visibility.

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

Good job, thanks boiko!

review: Approve
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
Mihir Soni (mihirsoni) wrote :

looks good :) Thank you boiko

review: Approve
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
Francis Ginther (fginther) wrote :

Fixed issue with generic-mediumtests, re-approving.

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 'Simple/CalcLabel.qml'
--- Simple/CalcLabel.qml 2013-08-28 13:45:38 +0000
+++ Simple/CalcLabel.qml 2013-08-28 21:16:07 +0000
@@ -81,7 +81,7 @@
8181
82 visible: root.numbers || root.operation82 visible: root.numbers || root.operation
8383
84 onFocusChanged: {84 onActiveFocusChanged: {
85 if (numberName.activeFocus)85 if (numberName.activeFocus)
86 calcKeyboardVisible = false86 calcKeyboardVisible = false
87 }87 }
8888
=== modified file 'Simple/Screen.qml'
--- Simple/Screen.qml 2013-08-28 13:45:38 +0000
+++ Simple/Screen.qml 2013-08-28 21:16:07 +0000
@@ -208,7 +208,7 @@
208 hasClearButton: false208 hasClearButton: false
209 font.pixelSize: FontUtils.sizeToPixels("medium")209 font.pixelSize: FontUtils.sizeToPixels("medium")
210210
211 onFocusChanged: {211 onActiveFocusChanged: {
212 if (title.activeFocus)212 if (title.activeFocus)
213 calcKeyboardVisible = false213 calcKeyboardVisible = false
214 }214 }
215215
=== modified file 'tests/autopilot/ubuntu_calculator_app/emulators.py'
--- tests/autopilot/ubuntu_calculator_app/emulators.py 2013-08-27 17:01:06 +0000
+++ tests/autopilot/ubuntu_calculator_app/emulators.py 2013-08-28 21:16:07 +0000
@@ -200,6 +200,10 @@
200 else:200 else:
201 return None201 return None
202202
203 def click_result_label(self):
204 result = self.get_result_label()
205 self.pointing_device.click_object(result)
206
203 def get_title_label(self):207 def get_title_label(self):
204 return self.select_single('TextField', objectName='title')208 return self.select_single('TextField', objectName='title')
205209
206210
=== modified file 'tests/autopilot/ubuntu_calculator_app/tests/test_simple_page.py'
--- tests/autopilot/ubuntu_calculator_app/tests/test_simple_page.py 2013-08-28 16:04:38 +0000
+++ tests/autopilot/ubuntu_calculator_app/tests/test_simple_page.py 2013-08-28 21:16:07 +0000
@@ -238,9 +238,7 @@
238 self.assertThat(title_label.activeFocus, Eventually(Equals(True)))238 self.assertThat(title_label.activeFocus, Eventually(Equals(True)))
239239
240 # Click elsewhere to unfocus the label240 # Click elsewhere to unfocus the label
241 calc_keyboard = self.main_view.get_calc_keyboard()241 screen.click_result_label()
242 calc_keyboard.click_equals()
243
244 self.assertThat(title_label.activeFocus, Eventually(Equals(False)))242 self.assertThat(title_label.activeFocus, Eventually(Equals(False)))
245243
246 def test_hide_calc_keyboard(self):244 def test_hide_calc_keyboard(self):
@@ -253,9 +251,8 @@
253 screen.click_title_label()251 screen.click_title_label()
254252
255 calc_keyboard = self.main_view.get_calc_keyboard()253 calc_keyboard = self.main_view.get_calc_keyboard()
256
257 self.assertThat(calc_keyboard.visible, Eventually(Equals(False)))254 self.assertThat(calc_keyboard.visible, Eventually(Equals(False)))
258255
259 # Click elsewhere to unfocus the label256 # Click elsewhere to unfocus the label
260 calc_keyboard.click_equals()257 screen.click_result_label()
261 self.assertThat(calc_keyboard.visible, Eventually(Equals(True)))258 self.assertThat(calc_keyboard.visible, Eventually(Equals(True)))

Subscribers

People subscribed via source and target branches