Merge lp:~carla-sella/ubuntu-docviewer-app/test-toc into lp:ubuntu-docviewer-app/trunk
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Alan Pope 🍺🐧🐱 🦄 on 2015-05-15 | ||||
| Approved revision: | 146 | ||||
| Merged at revision: | 141 | ||||
| Proposed branch: | lp:~carla-sella/ubuntu-docviewer-app/test-toc | ||||
| Merge into: | lp:ubuntu-docviewer-app/trunk | ||||
| Diff against target: |
307 lines (+158/-13) 5 files modified
po/com.ubuntu.docviewer.pot (+5/-5) src/app/qml/pdfView/PdfContentsPage.qml (+11/-0) tests/autopilot/ubuntu_docviewer_app/__init__.py (+94/-7) tests/autopilot/ubuntu_docviewer_app/tests/test_docviewer.py (+1/-1) tests/autopilot/ubuntu_docviewer_app/tests/test_toc.py (+47/-0) |
||||
| To merge this branch: | bzr merge lp:~carla-sella/ubuntu-docviewer-app/test-toc | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve on 2015-05-08 | |
| Nicholas Skaggs | 2015-05-01 | Approve on 2015-05-08 | |
| Stefano Verzegnassi | 2015-05-01 | Approve on 2015-05-05 | |
|
Review via email:
|
|||
Commit Message
First test for testing Docviewer app TOC.
Description of the Change
First test for testing Docviewer app TOC.
| Carla Sella (carla-sella) wrote : | # |
| Carla Sella (carla-sella) wrote : | # |
Ok test completed. Should be ok for rewiew now :).
- 139. By Carla Sella on 2015-05-02
-
Fixed little error.
FAILED: Continuous integration, rev:139
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 140. By Carla Sella on 2015-05-02
-
Fixed regression on test test_go_
to_page_ pdf_file.
PASSED: Continuous integration, rev:140
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Carla Sella (carla-sella) wrote : | # |
\o/ passed :).
Hi Carla,
thanks for the MP!
There is an issue that makes tests fail on my PC.
I've added two in-line comment (at lines 56 and 168).
| Carla Sella (carla-sella) wrote : | # |
Hi Stefano,
I left replies to your comments.
I will find a fix for your problem and let you know so you can test it.
| Carla Sella (carla-sella) wrote : | # |
By the way, Stefano, can you send me the error output you get on your computer as this does not occur on my Desktop. The strange thing for me is that "self.bottomEdg
| Carla Sella (carla-sella) wrote : | # |
Another thing, you are using "autopilot3 run -vv test-name" to launch the tests, right?
- 141. By Carla Sella on 2015-05-02
-
Added comment on PdfContentPage.qml propery.
PASSED: Continuous integration, rev:141
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Here's the log: http://
I think I found out the issue.
When you run the test, where is the DocViewer window on the screen?
If the window is anchored on the bottom-right corner, the suite runs well with no failure, but if the window is floating in the middle of the screen, ToC tests return a failure.
Having a look at what happens on the screen, it seems that depends on the WM.
I've seen that in the former case, the mouse cursor does not change its hint and it's not possible to resize the window from its bottom edge, since the cursor can not reach the border of the window.
In the latter that's possible, and the window is resized.
The 0.3 second delay makes the tests working, so I suppose that the coordinate for the bottomEdgeTip are wrong.
Without the delay, the mouse cursor is moved to y=659, with the delay to y=644. The difference is 15px. If it may be useful, 15px = units.gu(1.875).
- 142. By Carla Sella on 2015-05-02
-
First try to fix bottome edge issue.
| Carla Sella (carla-sella) wrote : | # |
Hello Stefano,
I tried to fix the bottom edge issue adding this line:
action_
(action_item is the bottomEdgeTip.
If you can test this on you PC to see if it still fails.
I have found another issue though: the test fails when trying to click on the "Chapter 3. Package Management" content line as it is out of the Doviewer app window and not visible, but in autopilot vis it is in the QQuickListView and the test clicks on it as it is in the QQuickListView as a ListItemWithAct
I'm not sure I have been clear, hope this screenshot helps to understand the issue:
https:/
FAILED: Continuous integration, rev:142
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
My Autopilot knowledge is poor, I'm learning case by case.
Dunno how to make test waiting for the bottomEdgeTip to be completely visible, but I found a better workaround that worked for me.
Since the tip is always partially visible (by a units.gu(1) offset), even when hidden, setting
start_y = (action_
does the trick and grants a legal value which is inside the window boundaries.
The issue with scroll seems to be the same issue I have with the bottomEdge.
I tried to add a further check that ensure the ToC entry will be visible, and it worked: http://
- 143. By Carla Sella on 2015-05-04
-
Inserted fixes suggested by Stefano for Bottom Edge and content items not visible.
| Carla Sella (carla-sella) wrote : | # |
Thanks Stefano.
Your fixes worked so, probably you know Autopilot enough :-).
| Carla Sella (carla-sella) wrote : | # |
Thanks Stefano.
Your fixes worked so your knowledge of Autopilot is good :-).
PASSED: Continuous integration, rev:143
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Carla Sella (carla-sella) wrote : | # |
Thanks Stefano.
Your fixes worked so your knowledge of Autopilot is good :-).
PASSED: Continuous integration, rev:143
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Carla Sella (carla-sella) wrote : | # |
Thanks Stefano.
Your fixes worked so your knowledge of Autopilot is good :-).
Heh, if I had to write this test suite, I'd be still trying to understand where to start. :-)
Anyway, it LGTM now! Thanks Carla!
P.S. No problem for having sent the comment several times!
Forgot to ask: should I wait for balloons' review, before top-approve it?
| Carla Sella (carla-sella) wrote : | # |
I am not sure if Nicholas has to approve it too, maybe just ask him :), I
usually always ask him to reiview,but maybe it is not necessary.
--
Carla Sella
email: <email address hidden>
http://
On Tue, May 5, 2015 at 3:02 PM, Stefano Verzegnassi <<email address hidden>
> wrote:
> Forgot to ask: should I wait for balloons' review, before top-approve it?
> --
>
> https:/
> You are the owner of lp:~carla-sella/ubuntu-docviewer-app/test-toc.
>
- 144. By Carla Sella on 2015-05-06
-
Fixed code as Nicholas asked to.
PASSED: Continuous integration, rev:144
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 145. By Carla Sella on 2015-05-06
-
Fixed while loop.
| Carla Sella (carla-sella) wrote : | # |
Fixed the part of the while loop.
PASSED: Continuous integration, rev:145
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Nicholas Skaggs (nskaggs) wrote : | # |
+1 from me, but do change the logger.warn to something else before top approving.
- 146. By Carla Sella on 2015-05-08
-
Deleted logger.warn.
PASSED: Continuous integration, rev:146
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://


Still have to fix scrolling.