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
1=== modified file 'Simple/CalcLabel.qml'
2--- Simple/CalcLabel.qml 2013-08-28 13:45:38 +0000
3+++ Simple/CalcLabel.qml 2013-08-28 21:16:07 +0000
4@@ -81,7 +81,7 @@
5
6 visible: root.numbers || root.operation
7
8- onFocusChanged: {
9+ onActiveFocusChanged: {
10 if (numberName.activeFocus)
11 calcKeyboardVisible = false
12 }
13
14=== modified file 'Simple/Screen.qml'
15--- Simple/Screen.qml 2013-08-28 13:45:38 +0000
16+++ Simple/Screen.qml 2013-08-28 21:16:07 +0000
17@@ -208,7 +208,7 @@
18 hasClearButton: false
19 font.pixelSize: FontUtils.sizeToPixels("medium")
20
21- onFocusChanged: {
22+ onActiveFocusChanged: {
23 if (title.activeFocus)
24 calcKeyboardVisible = false
25 }
26
27=== modified file 'tests/autopilot/ubuntu_calculator_app/emulators.py'
28--- tests/autopilot/ubuntu_calculator_app/emulators.py 2013-08-27 17:01:06 +0000
29+++ tests/autopilot/ubuntu_calculator_app/emulators.py 2013-08-28 21:16:07 +0000
30@@ -200,6 +200,10 @@
31 else:
32 return None
33
34+ def click_result_label(self):
35+ result = self.get_result_label()
36+ self.pointing_device.click_object(result)
37+
38 def get_title_label(self):
39 return self.select_single('TextField', objectName='title')
40
41
42=== modified file 'tests/autopilot/ubuntu_calculator_app/tests/test_simple_page.py'
43--- tests/autopilot/ubuntu_calculator_app/tests/test_simple_page.py 2013-08-28 16:04:38 +0000
44+++ tests/autopilot/ubuntu_calculator_app/tests/test_simple_page.py 2013-08-28 21:16:07 +0000
45@@ -238,9 +238,7 @@
46 self.assertThat(title_label.activeFocus, Eventually(Equals(True)))
47
48 # Click elsewhere to unfocus the label
49- calc_keyboard = self.main_view.get_calc_keyboard()
50- calc_keyboard.click_equals()
51-
52+ screen.click_result_label()
53 self.assertThat(title_label.activeFocus, Eventually(Equals(False)))
54
55 def test_hide_calc_keyboard(self):
56@@ -253,9 +251,8 @@
57 screen.click_title_label()
58
59 calc_keyboard = self.main_view.get_calc_keyboard()
60-
61 self.assertThat(calc_keyboard.visible, Eventually(Equals(False)))
62
63 # Click elsewhere to unfocus the label
64- calc_keyboard.click_equals()
65+ screen.click_result_label()
66 self.assertThat(calc_keyboard.visible, Eventually(Equals(True)))

Subscribers

People subscribed via source and target branches