Merge lp:~diegosarmentero/ubuntu-sso-client/clean-form into lp:ubuntu-sso-client

Proposed by Diego Sarmentero on 2012-03-05
Status: Merged
Approved by: Natalia Bidart on 2012-03-05
Approved revision: 898
Merged at revision: 899
Proposed branch: lp:~diegosarmentero/ubuntu-sso-client/clean-form
Merge into: lp:ubuntu-sso-client
Diff against target: 27 lines (+9/-0)
2 files modified
ubuntu_sso/qt/setup_account_page.py (+1/-0)
ubuntu_sso/qt/tests/test_setup_account.py (+8/-0)
To merge this branch: bzr merge lp:~diegosarmentero/ubuntu-sso-client/clean-form
Reviewer Review Type Date Requested Status
Natalia Bidart 2012-03-05 Approve on 2012-03-05
Review via email: mp+95986@code.launchpad.net

Commit Message

- Hide the errors label on refresh captcha (LP: #947202).

To post a comment you must log in.
Natalia Bidart (nataliabidart) wrote :

Looks great!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu_sso/qt/setup_account_page.py'
2--- ubuntu_sso/qt/setup_account_page.py 2012-03-02 14:42:06 +0000
3+++ ubuntu_sso/qt/setup_account_page.py 2012-03-05 20:01:37 +0000
4@@ -278,6 +278,7 @@
5 def _refresh_captcha(self):
6 """Refresh the captcha image shown in the ui."""
7 logger.debug('SetUpAccountPage._refresh_captcha')
8+ self.hide_error()
9 # lets clean behind us, do we have the old file arround?
10 if self.captcha_file and os.path.exists(self.captcha_file):
11 os.unlink(self.captcha_file)
12
13=== modified file 'ubuntu_sso/qt/tests/test_setup_account.py'
14--- ubuntu_sso/qt/tests/test_setup_account.py 2012-03-02 14:42:06 +0000
15+++ ubuntu_sso/qt/tests/test_setup_account.py 2012-03-05 20:01:37 +0000
16@@ -389,3 +389,11 @@
17 self.ui.on_captcha_refresh_complete()
18 self.assertEqual(self._overlay_hide_counter, 1)
19 self.assertTrue(self.ui.isEnabled())
20+
21+ def test_hide_error_on_refresh_captcha(self):
22+ """Test that the errors are hidden on refresh captcha."""
23+ self.ui.show()
24+ self.addCleanup(self.ui.hide)
25+ self.ui.show_error(self.app_name, 'error-message')
26+ self.ui.ui.refresh_label.linkActivated.emit('link')
27+ self.assertEqual(self.ui.form_errors_label.text(), ' ')

Subscribers

People subscribed via source and target branches