Merge lp://qastaging/~nataliabidart/ubuntu-sso-client/gtk-gi into lp://qastaging/ubuntu-sso-client

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 862
Merged at revision: 843
Proposed branch: lp://qastaging/~nataliabidart/ubuntu-sso-client/gtk-gi
Merge into: lp://qastaging/ubuntu-sso-client
Prerequisite: lp://qastaging/~alecu/ubuntu-sso-client/use-restful-client
Diff against target: 2630 lines (+720/-500)
32 files modified
data/gtk/ui.glade (+314/-180)
run-tests (+13/-15)
ubuntu_sso/account.py (+7/-3)
ubuntu_sso/gtk/__init__.py (+1/-3)
ubuntu_sso/gtk/gui.py (+90/-60)
ubuntu_sso/gtk/main.py (+5/-3)
ubuntu_sso/gtk/tests/__init__.py (+1/-3)
ubuntu_sso/gtk/tests/test_gui.py (+76/-56)
ubuntu_sso/gtk/tests/test_main.py (+4/-4)
ubuntu_sso/keyring/__init__.py (+17/-9)
ubuntu_sso/keyring/tests/test_common.py (+4/-5)
ubuntu_sso/keyring/tests/test_linux.py (+1/-1)
ubuntu_sso/logger.py (+20/-4)
ubuntu_sso/main/__init__.py (+2/-2)
ubuntu_sso/main/glib.py (+45/-0)
ubuntu_sso/main/linux.py (+27/-22)
ubuntu_sso/main/qt.py (+49/-0)
ubuntu_sso/main/windows.py (+1/-1)
ubuntu_sso/qt/gui.py (+2/-1)
ubuntu_sso/qt/tests/login_u_p.py (+16/-5)
ubuntu_sso/qt/tests/show_gui.py (+5/-6)
ubuntu_sso/qt/tests/test_controllers.py (+4/-3)
ubuntu_sso/qt/tests/test_enchanced_line_edit.py (+3/-2)
ubuntu_sso/qt/tests/test_reset_password.py (+2/-1)
ubuntu_sso/tests/__init__.py (+2/-2)
ubuntu_sso/tests/bin/show_gui (+0/-58)
ubuntu_sso/tests/bin/show_nm_state (+0/-41)
ubuntu_sso/tests/test_account.py (+1/-1)
ubuntu_sso/utils/tests/test_txsecrets.py (+3/-0)
ubuntu_sso/utils/webclient/__init__.py (+2/-4)
ubuntu_sso/utils/webclient/qtnetwork.py (+2/-0)
ubuntu_sso/utils/webclient/tests/test_webclient.py (+1/-5)
To merge this branch: bzr merge lp://qastaging/~nataliabidart/ubuntu-sso-client/gtk-gi
Reviewer Review Type Date Requested Status
dobey (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+90134@code.qastaging.launchpad.net

Commit message

- Added a dedicated logger for the gui module.
- Migrated the GTK UI to use GI bindings (LP: #801111).
- Enabled libsoup backend for webclient so the GTK UI will work.
- Enabled the running of all the tests using the single command ./run-tests.
- Added an initial version of GLib and Qt mainloop integration (needed to run all the tests).

Description of the change

You need to be running latest Ubuntu One nightlies in order this branch to work.

Also, if testing IRL, please note that the captcha image will not load because of bug #921822 (the rest of the remote calls works perfectly).

Another thing to note is that the change in the .glade file is caused by the upgrade of the syntax to latest Glade version (the changes were the result of opening the file in Glade @ precise, adding the activate-link signal handler to the 2 LinkButton we have, saving, and closing the file).

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
dobey (dobey) wrote :

I'm seeing a lot of the following error, in the GTK+ tests, though the tests still pass:

Gtk-WARNING **: Unable to show 'foo': Operation not supported

Do you know why this is happening?

Revision history for this message
dobey (dobey) wrote :

There also seem to be some differences from the currently shipped version, in terms of size/layout. Is there a way to test all of the pieces without actually creating a new account? I'm not really sure how to test this IRL, beyond the simple "i already have an account" piece, without making real accounts.

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

> I'm seeing a lot of the following error, in the GTK+ tests, though the tests
> still pass:
>
> Gtk-WARNING **: Unable to show 'foo': Operation not supported
>
> Do you know why this is happening?

Yes. In the UI we have a couple of LinkButton's that are not meant to open any link in any browser. I added a dummy callback (on_activate_link) and I connected it with those buttons to the activate-link signal. According to the doc, if I define a handler for the activate-signal and return True, http://developer.gnome.org/gtk3/stable/GtkLinkButton.html#GtkLinkButton-activate-link, the default handler gtk_show_uri will not be called, but in practice it's called. I would guess this is a bug... the warning complains about the "uri" property being invalid (which is intended, since we don't want any link to be opened in any browser).

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

> There also seem to be some differences from the currently shipped version, in
> terms of size/layout. Is there a way to test all of the pieces without
> actually creating a new account? I'm not really sure how to test this IRL,
> beyond the simple "i already have an account" piece, without making real
> accounts.

Yes, there are some size differences, but shouldn't be layout differences.

The way of test is actually creating SSO accounts... but you can do it for dummy applications and not for Ubuntu One (so your U1 metadata does not get messed up). To do so:

* in a terminal pointing to this branch run:

DEBUG=True PYTHONPATH=. bin/ubuntu-sso-login

* open d-feet and connect to the session bus, look for the com.ubuntu.sso service, and go to the CredentialsManagement interface. Choose the "login" or "register" method, and pass arguments like:

'Foo', {}

or:

'Foo Bar', {'help_text': 'something for test here'}

When you execute one of the methods above, you should get a GTK window with the login or register screen in it, and you should be able to login or create a kinda dummy account.

Revision history for this message
dobey (dobey) wrote :

https://launchpadlibrarian.net/91640946/sso-gtk3-nowrap.png shows what I meant about layout. It looks like the description label is not getting wrapped. I don't know if this is due to a change in this branch to the glade data, or if it's introduced by changes in gtk3 itself. I suspect the latter though.

Revision history for this message
dobey (dobey) wrote :

Looks OK to me. I think we'll need a bug against python-gi for breaking ^C. I'll file it shortly. I have filed bug #925042 against ubuntu-sso-client for the label wrapping issue.

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

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

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

*** Running 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]
  CredentialsAuthDeniedTestCase
    test_auth_denial_cb ... [OK]
  CredentialsCallbacksTestCase
    test_callbacks_are_stored ... [OK]
    test_callbacks_default_to_no_op ... [OK]
    test_creation_parameters_are_stored ... ...

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

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

*** Running 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]
  CredentialsAuthDeniedTestCase
    test_auth_denial_cb ... [OK]
  CredentialsCallbacksTestCase
    test_callbacks_are_stored ... [OK]
    test_callbacks_default_to_no_op ... [OK]
    test_creation_parameters_are_stored ... ...

Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

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

*** Running test suite for ubuntu_sso ***

xvfb-run: error: Xvfb failed to start

859. By Natalia Bidart

- Adding proper cleanup for GTK windows created during tests.

860. By Natalia Bidart

- Add cleanups calls to every created UI.

861. By Natalia Bidart

Attaching new bug number.

862. By Natalia Bidart

Merged trunk in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches