Merge lp://staging/~dpniel/ubiquity/fix-1479064 into lp://staging/ubiquity

Proposed by Dan Chapman 
Status: Merged
Approved by: Mathieu Trudel-Lapierre
Approved revision: 6314
Merged at revision: 6323
Proposed branch: lp://staging/~dpniel/ubiquity/fix-1479064
Merge into: lp://staging/ubiquity
Diff against target: 66 lines (+37/-7)
1 file modified
autopilot/ubiquity_autopilot_tests/emulators/gtkcontrols.py (+37/-7)
To merge this branch: bzr merge lp://staging/~dpniel/ubiquity/fix-1479064
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
Max Brustkern (community) Approve
Review via email: mp+270226@code.staging.launchpad.net

Description of the change

[Autopilot tests] Fix handling of globalRect mismatches

Previously the test code would look up a GtkTreeView's GtkTreeViewAccessible
counterpart based on sharing the same globalRect co-ordinates and being
visible.

For some reason the coordinates seem to be slightly out each time, meaning
I had to extend the code to lookup all GtkTreeViewAccessible objects across
all tree's and find any that were within range of the GtkTreeView co-ords.
Although all steps (GtkContainers) of the installer are visible at all times
the actual step content is only visible when at that current step. So we can
be pretty sure there will only be one matching gtktreeviewaccessible object
within the given range on that particular step.

This patch seems to work pretty well for now.I did previously try
something a bit more complicated with raw xpath selecting but it
didn't seem to work out so well and was flaky at times.

This patch only fixes the mis-matched global rects and a fix is still needed
for the new "Confirm overwrite disk" dialog

Testing:

It's best to run the test_custom_install test to check this patch works for more than just the language selection treeview as it's also used in the manual partition step.

The runner can be setup to run this branch by creating a config file similar to the testrunner.cfg located in ubiquity-autopilot-runner/config and then run

  $ ./run-ubiquity-test -T path/to/testrunner.cfg --test ubiquity_autopilot_tests.tests.test_custom_install --sdl /path/to/wily-desktop-amd64.iso

The test will get blocked at the overwrite dialog step but you can either just close the runner or manually click the continue button to continue with the install as the test will carry on running.

To post a comment you must log in.
6314. By Dan Chapman 

Fix pep8 warnings

Revision history for this message
Max Brustkern (nuclearbob) wrote :

Now that I've actually managed to test this correctly, it appears to work. I'll continue testing the other branches as well, but this one looks good to me.

review: Approve
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) :
review: Approve

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

to status/vote changes: