Merge lp:~canonical-platform-qa/ubuntu-ui-toolkit/update-for-upcoming-autopilot-1.6 into lp:ubuntu-ui-toolkit/staging
| Status: | Rejected |
|---|---|
| Rejected by: | Tim Peeters on 2015-09-22 |
| Proposed branch: | lp:~canonical-platform-qa/ubuntu-ui-toolkit/update-for-upcoming-autopilot-1.6 |
| Merge into: | lp:ubuntu-ui-toolkit/staging |
| Diff against target: |
1737 lines (+965/-335) 18 files modified
examples/ubuntu-ui-toolkit-gallery/po/nl.po (+401/-279) examples/ubuntu-ui-toolkit-gallery/po/pt_BR.po (+412/-0) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py (+6/-1) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py (+5/-3) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py (+2/-1) tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_ubuntulistview.py (+8/-5) tests/autopilot/ubuntuuitoolkit/tests/__init__.py (+14/-6) tests/autopilot/ubuntuuitoolkit/tests/components/test_popover.py (+5/-2) tests/autopilot/ubuntuuitoolkit/tests/components/test_textinput.py (+30/-13) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_actionbar.py (+1/-1) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_dialog.py (+5/-2) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py (+34/-8) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py (+23/-7) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitem.py (+6/-3) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_main_view.py (+2/-0) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py (+4/-1) tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_sections.py (+1/-1) tests/autopilot/ubuntuuitoolkit/tests/gallery/test_ubuntulistview.py (+6/-2) |
| To merge this branch: | bzr merge lp:~canonical-platform-qa/ubuntu-ui-toolkit/update-for-upcoming-autopilot-1.6 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Tim Peeters | Resubmit on 2015-09-22 | ||
| Zoltan Balogh (community) | Approve on 2015-09-21 | ||
| PS Jenkins bot | continuous-integration | Approve on 2015-07-21 | |
| Christian Dywan | 2015-06-16 | Needs Information on 2015-07-09 | |
|
Review via email:
|
|||
Commit Message
Update autopilot tests and helpers to work with the new Autopilot 1.6 version.
Description of the Change
Update autopilot tests and helpers to work with the new Autopilot 1.6 version.
This branch depends on the release of the latest Autopilot 1.6. This MP will be updated when this will be happening to make sure everything lands nicely.
| Omer Akram (om26er) wrote : | # |
The build failed due to pyflakes warnings, I fixed that and pushed.
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1204
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Christian Dywan (kalikiana) wrote : | # |
I've got some questions about this - nothing here is necessarily wrong, but I'm somewhat concerned about code readability with some of the changes.
+ from ubuntuuitoolkit
These inline import seem odd to me. Why aren't those at the top like usual?
342 - topButton = self.main_
343 + topButton = ProxyBase.
344 + self.main_
345 + )
Is this a new, incompatible pattern in the Autopilot API? Will all apps need to use this? Why wouldn't select_single be fixed instead?
+ UbuntuUIToolkit
If this is our own API, wouldn't it be clearer to call it ProxyBase instead of locally renaming it? That way it'll be less confusing.
- 1204. By Christopher Lee on 2015-07-20
-
Merge trunk
- 1205. By Christopher Lee on 2015-07-20
-
Remove use of emualtor_base
- 1206. By Christopher Lee on 2015-07-20
-
Update with more fixes.
- 1207. By Christopher Lee on 2015-07-20
-
Merge changes
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1207
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Christopher Lee (veebers) wrote : | # |
Sorry for the delay, this work went a little stale but I'm back on it now.
> I've got some questions about this - nothing here is necessarily wrong, but
> I'm somewhat concerned about code readability with some of the changes.
>
> + from ubuntuuitoolkit
>
> These inline import seem odd to me. Why aren't those at the top like usual?
Oops, that was a mistake on my part, I had meant to move it up to the top once tested.
>
> 342 - topButton =
> self.main_
> 343 + topButton = ProxyBase.
> 344 + self.main_
> 345 + )
>
> Is this a new, incompatible pattern in the Autopilot API? Will all apps need
> to use this? Why wouldn't select_single be fixed instead?
This change is due to how Custom Proxy Objects now work in autopilot 1.6. Previously there was an 'registry' that stored known CPO classes and match them to an application + object 'automagically'. This was prone to failure and confusing issues as populating the registry was non-deterministic (and relied on the python import mechanics).
The registry also meant you launched an application with an 'emulator_base' which meant that any proxy object created for that application will at least have a base class of that.
From 1.6 onwards CPO usage is explicit, i.e. the CPO passed into select_single (or the other query methods) will be the one used to create the proxy object (assuming the validate_dbus matches etc.). If passing None or a string to select_single et. al a 'generated default' is created which is the basic autopilot.
This also means that there is no emulator_base, so if no CPO class is provided to select_single what now is returned is a generated default and not a basic emulator_base type (which used to be a UITK Proxy base and have a swipe_into_view method).
This is a pretty big change to how autopilot proxy objects and custom proxy classes work which is why we're going through and ensuring it works and updating core helpes (UITK & Unity8) and will then move onto the apps.
This change also means that the use of which CPO is used to create a proxy object is obvious and deterministic and does depend on when or if someone import the class at the right time.
So this code used to work because while it only used objectName for select_single, the emaultor_base used to launch the application was used. Now it would only be a gen. default with none of the extra methods.
A different way of doing this would be: http://
I'm interested to hear thoughts on this because, as I mentioned, this is a big change to how things used to work so there may be some friction with it.
>
> + UbuntuUIToolkit
>
> If this is our own API, wouldn't it be clearer to call it ProxyBase instead of
> locally renaming it? That way it'll be less confusing.
Very good point, was used purely to get around the 80 char limit of pep8 :-)
- 1208. By Christopher Lee on 2015-07-21
-
Moved import to top of file.
- 1209. By Christopher Lee on 2015-07-21
-
Make change as per MP comments.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1209
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1209
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Zoltan Balogh (bzoltan) wrote : | # |
Surprisingly, even if it is an old MR it does not conflict with the staging.
| Tim Peeters (tpeeters) wrote : | # |
This MR was merged into our staging, but because we don't have AP 1.6 yet it breaks our tests. I revert the changes here https:/
When autopilot 1.6 is ready, please make a new MR to propose the needed changes.

FAILED: Continuous integration, rev:1203 jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- ci/1957/ jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-amd64- ci/685/ console jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-armhf- ci/687/ console jenkins. qa.ubuntu. com/job/ ubuntu- sdk-team- ubuntu- ui-toolkit- staging- vivid-i386- ci/684/ console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/ubuntu- sdk-team- ubuntu- ui-toolkit- staging- ci/1957/ rebuild
http://