Merge lp:~diegosarmentero/ubuntu-sso-client/930722 into lp:ubuntu-sso-client

Proposed by Diego Sarmentero
Status: Merged
Approved by: Natalia Bidart
Approved revision: 864
Merged at revision: 867
Proposed branch: lp:~diegosarmentero/ubuntu-sso-client/930722
Merge into: lp:ubuntu-sso-client
Diff against target: 72 lines (+21/-4)
2 files modified
ubuntu_sso/qt/current_user_sign_in_page.py (+6/-1)
ubuntu_sso/qt/tests/test_current_user_sign_in_page.py (+15/-3)
To merge this branch: bzr merge lp:~diegosarmentero/ubuntu-sso-client/930722
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+92802@code.launchpad.net

Commit message

- Fixed: Qt UI: "I've forgotten my password" button can not be clicked (LP: #930722)

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) wrote :

+1

review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks good!

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (63.9 KiB)

The attempt to merge lp:~diegosarmentero/ubuntu-sso-client/930722 into lp:ubuntu-sso-client failed. Below is the output from the failed tests.

*** Running GTK test suite for ubuntu_sso ***
ubuntu_sso.tests.test_account
  AccountTestCase
    test_generate_captcha ... [OK]
    test_is_not_validated ... [OK]
    test_is_not_validated_empty_result ... [OK]
    test_is_validated ... [OK]
    test_login_if_http_error ... [OK]
    test_login_if_no_error ... [OK]
    test_register_user_checks_valid_email ... [OK]
    test_register_user_checks_valid_password ... [OK]
    test_register_user_if_status_error ... [OK]
    test_register_user_if_status_error_with_string_message ... [OK]
    test_register_user_if_status_ok ... [OK]
    test_register_user_if_status_unknown ... [OK]
    test_request_password_reset_token_if_http_error ... [OK]
    test_request_password_reset_token_if_status_ok ... [OK]
    test_request_password_reset_token_if_status_unknown ... [OK]
    test_set_new_password_if_http_error ... [OK]
    test_set_new_password_if_status_ok ... [OK]
    test_set_new_password_if_status_unknown ... [OK]
    test_validate_email_if_status_error ... [OK]
    test_validate_email_if_status_error_with_string_message ... [OK]
    test_validate_email_if_status_ok ... [OK]
    test_validate_email_if_status_unknown ... [OK]
  EnvironOverridesTestCase
    test_no_override_service_url ... [OK]
    test_override_service_url ... [OK]
    test_service_url_as_parameter ... [OK]
twisted.trial.unittest
  TestCase
    runTest ... [OK]
ubuntu_sso.tests.test_account
  TimestampedAuthorizerTestCase
    test_authorize_request_includes_timestamp ... [OK]
ubuntu_sso.tests.test_credentials
  BasicTestCase
    runTest ... [OK]
  ClearCredentialsTestCase
    test_clear_credentials ... [OK]
    test_keyring_failure ... [OK]
  CredentialsCallbacksTestCase
    test_creation_parameters_are_stored ... [OK]
    test_help_text_defaults_to_empty_string ... [OK]
    test_ping_url_defaults_to_none ... [OK]
    test_policy_url_defaults_to_none ... [OK]
    test_tc...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu_sso/qt/current_user_sign_in_page.py'
2--- ubuntu_sso/qt/current_user_sign_in_page.py 2012-02-13 14:04:27 +0000
3+++ ubuntu_sso/qt/current_user_sign_in_page.py 2012-02-13 17:24:04 +0000
4@@ -33,6 +33,9 @@
5 )
6
7
8+FORGOTTEN_PASSWORD_LINK_STYLE = '<a href="#">{forgotten_text}</a>'
9+
10+
11 _ = gettext.gettext
12 logger = setup_logging('ubuntu_sso.current_user_sign_in_page')
13
14@@ -105,7 +108,9 @@
15 logger.debug('CurrentUserSignInPage._set_translated_strings')
16 self.ui.email_label.setText(EMAIL_LABEL)
17 self.ui.password_label.setText(LOGIN_PASSWORD_LABEL)
18- self.ui.forgot_password_label.setText(FORGOTTEN_PASSWORD_BUTTON)
19+ forgotten_text = FORGOTTEN_PASSWORD_LINK_STYLE.format(
20+ forgotten_text=FORGOTTEN_PASSWORD_BUTTON)
21+ self.ui.forgot_password_label.setText(forgotten_text)
22 self.ui.sign_in_button.setText(SIGN_IN_BUTTON)
23
24 def _connect_ui(self):
25
26=== modified file 'ubuntu_sso/qt/tests/test_current_user_sign_in_page.py'
27--- ubuntu_sso/qt/tests/test_current_user_sign_in_page.py 2012-02-13 14:04:27 +0000
28+++ ubuntu_sso/qt/tests/test_current_user_sign_in_page.py 2012-02-13 17:24:04 +0000
29@@ -126,8 +126,10 @@
30 current_user_sign_in_page.EMAIL_LABEL)
31 self.assertEqual(self.ui.ui.password_label.text(),
32 current_user_sign_in_page.LOGIN_PASSWORD_LABEL)
33+ text = current_user_sign_in_page.FORGOTTEN_PASSWORD_LINK_STYLE.format(
34+ forgotten_text=current_user_sign_in_page.FORGOTTEN_PASSWORD_BUTTON)
35 self.assertEqual(self.ui.ui.forgot_password_label.text(),
36- current_user_sign_in_page.FORGOTTEN_PASSWORD_BUTTON)
37+ text)
38 self.assertEqual(self.ui.ui.sign_in_button.text(),
39 current_user_sign_in_page.SIGN_IN_BUTTON)
40
41@@ -208,7 +210,7 @@
42 self.assertTrue(expected, self._called)
43
44 def test_on_logged_in(self):
45- """Test the on_login_error method."""
46+ """Test the on_login_in method."""
47 app_name = 'my_app'
48 email = 'email@example'
49 self.ui.app_name = app_name
50@@ -222,7 +224,7 @@
51 self.assertTrue((app_name, email) in self.signals_results)
52
53 def test_on_forgotten_password(self):
54- """Test the on_login_error method."""
55+ """Test the on_forgotten_password method."""
56
57 def slot():
58 """Fake slot."""
59@@ -230,3 +232,13 @@
60 self.ui.passwordForgotten.connect(slot)
61 self.ui.on_forgotten_password()
62 self.assertTrue(1 in self.signals_results)
63+
64+ def test_on_forgotten_password_link_clicked(self):
65+ """Test the on_forgotten_password method."""
66+
67+ def slot():
68+ """Fake slot."""
69+ self.signals_results.append(1)
70+ self.ui.passwordForgotten.connect(slot)
71+ self.ui.ui.forgot_password_label.linkActivated.emit("link")
72+ self.assertTrue(1 in self.signals_results)

Subscribers

People subscribed via source and target branches