Merge lp://staging/~allanlesage/unity8/autopilot-indicator-page-title-matches-widget into lp://staging/unity8
- autopilot-indicator-page-title-matches-widget
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Michał Sawicz |
Approved revision: | 527 |
Merged at revision: | 826 |
Proposed branch: | lp://staging/~allanlesage/unity8/autopilot-indicator-page-title-matches-widget |
Merge into: | lp://staging/unity8 |
Prerequisite: | lp://staging/~allanlesage/unity8/indicator-stubs |
Diff against target: |
185 lines (+109/-15) 3 files modified
tests/autopilot/unity8/indicators/tests/__init__.py (+17/-0) tests/autopilot/unity8/indicators/tests/test_indicators.py (+69/-13) tests/autopilot/unity8/shell/emulators/main_window.py (+23/-2) |
To merge this branch: | bzr merge lp://staging/~allanlesage/unity8/autopilot-indicator-page-title-matches-widget |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michał Sawicz | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Leo Arias (community) | code review | Approve | |
Nick Dedekind (community) | Approve | ||
Albert Astals Cid (community) | Needs Information | ||
Christopher Lee (community) | Approve | ||
Review via email: mp+196991@code.staging.launchpad.net |
Commit message
Swiping open an indicator must show its correct title--protect against lp:1253804 .
Description of the change
When I swipe open an indicator, the correct indicator page opens. This should protect against lp:1253804 .
Allan LeSage (allanlesage) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:503
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Christopher Lee (veebers) wrote : | # |
Hi Allan, just a couple of comments.
I would make a DefaultIndicato
- to this add the swipe_to_open and swipe_to_close methods
- perhaps also add get_center for now (although as mentioned there is a better
place).
-> Yes you're correct that you'll need to provide the coords, unlike
click_object which determines the center itself.
Then there is no need for an IndicatorBaseTe
of the emulator/proxy that needs them.
line:58, 61 cleanup not needed as drag is a "finger down, move and finger up"
operation.
line:46-49: not needed (as per above)
line:120 -> should have the skip within the setup (not decorated).
i.e.
def setUp(self):
if model() == "Desktop":
self.
line:126 -> Docstring
The docstring should be descriptive not narrative.
"Swiping open an indicator must show the correct title."
line:140
This assert is not needed, if there is nothing found for the criteria
(i.e. type and title text in this case) wait_select_single will raise an
exception (thus failing the test.)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:503
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:503
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:506
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:508
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https:/
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Christopher Lee (veebers) wrote : | # |
The acceptance tests look good to me.
Not happy about the "# TODO: assert that the indicator page closed" but as they're not required for this I will approve.
Please file a bug against the tests to fix the TODOs.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:509
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:510
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
/tmp/buildd/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:511
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Leo Arias (elopio) wrote : | # |
53 +
A small pita comment, I don't like that space :)
64 + self.globalRect
65 + self.globalRect
You now can do globalRect.x, globalRect.y, globalRect.height, globalRect.width. That makes it clearer.
77 + # TODO: assert that the indicator page opened
A nice thing that might be useful in the future is signing the comments like that, using -- alesage - 2013-12-06.
153 + self.assertIsNo
189 + self.assertIsNo
Please notice that select single will throw an exception now if it doesn't find the object, instead of returning None as it did before. So I think that line is not necessary, if the widget is not present, an exception will be raised and the test will fail.
The test reads nicely. I'm just wondering if this can be run faster as a QtTest. But I'm not sure how the indicators are implemented, if this involves several projects, autopilot is probably the best option.
Marking as needs fixing only for the assertIsNotNone.
Thank you!
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:512
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Allan LeSage (allanlesage) wrote : | # |
Leo's on holiday but I've implemented his suggested changes; Saviq, are the unstable tests holding us back? (Note that dednick is also on holidays.)
Albert Astals Cid (aacid) wrote : | # |
FWIW dednick is not on holidays anymore (or at least was in yesterday)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:512
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Albert Astals Cid (aacid) wrote : | # |
What's the status of this?
Is it supposed to be held only by failing in CI?
I tried to rebuild the last rev but CI doesn't know about the job anymore.
Allan maybe you can merge master and push to get a rebuild?
Michał Sawicz (saviq) wrote : | # |
This is held by the issues with the prerequisite: https:/
Bug #1238417 needs to be fixed for this to continue :/
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:623
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
None: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:512
http://
Executed test runs:
UNSTABLE: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:512
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
ATM the above basically says that the job passed, otto has issues with running u8 tests.
Nick Dedekind (nick-dedekind) wrote : | # |
While it all looks ok codewise, I think the opening/closing of the indicators should be provided by a higher level component than the widget itself, such as an Indicators emulator object, which could provide an open_indicator(
Marking as approved; emulators can be expanded later.
Nick Dedekind (nick-dedekind) wrote : | # |
Just waiting on test suite run before global approve :)
Allan LeSage (allanlesage) wrote : | # |
Apologies for the delay; merge of master forthcoming. . . .
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:512
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Allan LeSage (allanlesage) wrote : | # |
The new tests are failing; while running the new tests on my mako I'm seeing these failures as authentic: there's a new "shuffling" behavior which may be confusing the simple "does the header string match" test. Nick would you run these tests and give your opinion?
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:512
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Allan LeSage (allanlesage) wrote : | # |
Correction: an objectName for the IndicatorPage on which I was depending has been eliminated, need to discuss with dednick about how to get hold of that page again, marking this as "in progress" for the moment.
Allan LeSage (allanlesage) wrote : | # |
Dusting off this ancient MP, some minor changes from its prior incarnation. Recall that this was blocked on getting 'indicator stubs' through, now we'd like to land to enable some indicator-network autopilot tests for Wellark.
Leo Arias (elopio) wrote : | # |
9 +# Copyright (C) 2013 Canonical
32 +# Copyright (C) 2013 Canonical
94 +# Copyright (C) 2013 Canonical
This now got to 2014, so please add the new year.
57 + # TODO: submit to autopilot.
Can you please report it as a bug in autopilot and put the link here on this comment?
That way we will know when we can remove the TODO.
65 + def swipe_to_
76 + def swipe_to_
These two are good places to put the autopilot logging decorator.
I'm not sure if you have used it before. If not, take a look at dash.py or ping me.
Also, as the class name is DefaultIndicato
swipe_to_open
swipe_to_close
I leave that decision to you, if you think it's less clear, just leave them as they are now.
74 + # TODO: assert that the indicator page opened [alesage 2013-12-06]
85 + # TODO: assert that the indicator page closed [alesage 2013-12-06]
I think this is pretty important for the stability of the test. Are we missing something to be able to add a wait_for here?
143 + if platform.model() == "Desktop":
144 + self.skipTest("Test cannot be run on the desktop.")
Not a big deal, but after some discussion QAs seem to like more the single quotes, so I'm trying to convince people of this everywhere. Please change the double quotes for single.
206 + unity_proxy = self.launch_unity()
207 + unlock_
I would put these two statements on the setUp.
208 + widget = self.main_
209 + widget.
210 + indicator_page = self.main_
211 + indicator_
212 + )
213 + self.assertTrue
We could make this more page-object compliant changing the signatures of the methods.
get_indicator_
swipe_to_
So I would try to rewrite the test to something like:
indicator_page = self.main_
self.assertTrue
self.assertEqua
That's of course pseudocode and I'm not sure if it's doable at all. Let me know if you need a hand and I'll dig into the vis, or we can pair program some time.
ps: Feel free to disagree with me on any of the things I've written. If you think that the current way it's better for some reason, I'm always glad to discuss.
- 518. By Allan LeSage
-
Remove emulator, preferring main_window opening of indicator.
Allan LeSage (allanlesage) wrote : | # |
The need for a get_center has been served in the interim, thanks veebers for directing me to. I've adapted elopio's suggested style changes, eliminating the widget emulator--really the 'swipe' action belongs to an object that spans a few UI elements, e.g. the Tab, Widget, Page, and I'm not sure this fits the autopilot regime. But it's ok to just have that 'indicator' in the main_view for the moment IMO.
I'm blocked on getting the feedback for 'is the page open', will ask dednick about in the AM.
- 519. By Allan LeSage
-
Restore platform import (cursing pyflakes), sphinxify a return in main_window emulator.
- 520. By Allan LeSage
-
Autopilot wait for indicator to be fullyOpened.
Allan LeSage (allanlesage) wrote : | # |
Ok the property was suitably named 'fullyOpened', elopio if you could offer a final review please.
- 521. By Allan LeSage
-
Year amendment for indicators autopilot tests.
- 522. By Allan LeSage
-
Removing an unused/tested 'close_
indicator_ page' function. - 523. By Allan LeSage
-
Privatize get_indicator_
widget and get_indicator_page. - 524. By Allan LeSage
-
Adjust input import.
Leo Arias (elopio) : | # |
Allan LeSage (allanlesage) wrote : | # |
* Are there any related MPs required for this MP to build/function as expected? Please list.
No.
* Did you perform an exploratory manual test run of your code change and any related functionality?
This concerns adding an autopilot test and not new functionality; I've tested on mako and using the desktop emulator.
* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Packaging has not been changed.
* If you changed the UI, has there been a design review?
UI has not been changed.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:524
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Michał Sawicz (saviq) wrote : | # |
Could we get a skip for Nexus10 here? It doesn't have bluetooth...
Michał Sawicz (saviq) wrote : | # |
Basically something like what I did in https:/
- 525. By Allan LeSage
-
Merged trunk.
- 526. By Allan LeSage
-
Skip indicator-bluetooth on manta.
- 527. By Allan LeSage
-
Correct super invocation oops.
Allan LeSage (allanlesage) wrote : | # |
Made that change, tested on manta, appears to work as expected :) .
Michał Sawicz (saviq) wrote : | # |
+1
* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes.
* Did CI run pass? If not, please explain why.
Yup.
Michał Sawicz (saviq) wrote : | # |
One thing to remember, this is locale-dependent, maybe we should export LANG=C somewhere?
Some questions for reviewers:
dednick, can you advise on the best way to assert an indicator page is open? Concerns ll. 59 and 69.
veebers, does the 'scenario' form of this added test make sense, or should it be mashed into the original IndicatorTestCase ?
veebers, can you comment on the necessity of get_center utility function when using a Touch Pointer object? I see that there are utilities for pressing the centers of buttons, etc., but in any case I'll need an origin point to perform a drag, correct?