Some autopilot test rely on the list index position of a returned 'select_many'

Bug #1247711 reported by Christopher Lee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gallery-app (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

The returned list of a select_many in autopilot 1.4 has no guaranteed order of position for objects returned by select_many.

Some tests/helper methods rely on this (i.e. self.select_many("example")[1]) and expect it to return the intended object.

Revision history for this message
Olivier Tilloy (osomon) wrote :

The autopilot documentation for select_many (http://unity.ubuntu.com/autopilot/api/introspection.html#autopilot.introspection.dbus.DBusIntrospectionObject.select_many) doesn’t mention that the order is not guaranteed. Could that be a bug in autopilot itself, or does the documentation need updating?

Revision history for this message
Christopher Lee (veebers) wrote :

Hi Olivier

The autopilot documentation needs to be updated, so it's a bug in that sense :-)
I'll file a bug against autopilot for the documentation and follow it up.

Revision history for this message
Olivier Tilloy (osomon) wrote :

@Chris, I already filed bug #1248267 to track the issue in the documentation.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

What is needed within the gallery-app project?

Changed in gallery-app:
status: New → Incomplete
Revision history for this message
Olivier Tilloy (osomon) wrote :

In gallery-app, we need to go through all the calls to select_many(…) in the autopilot tests, and for the tests that assume a given order, fix them. One example of such an unreliable test is:

    def first_media_in_grid_view(self):
        grid_view = self.grid_view()
        return grid_view.select_many("OrganicItemInteraction")[0]

Changed in gallery-app:
status: Incomplete → Confirmed
affects: gallery-app → gallery-app (Ubuntu)
Changed in gallery-app (Ubuntu):
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.