~timo-jyrinki/gallery-app/allow_translating_date_strings

« back to all changes in this revision

Viewing changes to tests/autopilot/gallery_app/emulators/album_view.py

Fix AP tests
Approved by: Federico Gimenez

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
 
147
147
    def _get_remove_from_album_popover_remove_item(self):
148
148
        """Returns remove button of the remove from album popover."""
149
 
        return self.app.select_single("Button",
150
 
                                      objectName="removeFromAlbumButton",
151
 
                                      visible=True)
 
149
        return self.app.wait_select_single("Button",
 
150
                                           objectName="removeFromAlbumButton",
 
151
                                           visible=True)
152
152
 
153
153
    def _get_remove_from_album_popover_delete_item(self):
154
154
        """Returns delete button of the remove from album popover."""
155
 
        return self.app.select_single(
 
155
        return self.app.wait_select_single(
156
156
            "Button",
157
157
            objectName="removeFromAlbumAndDeleteButton",
158
158
            visible=True)
159
159
 
160
160
    def _get_remove_from_album_popover_cancel_item(self):
161
161
        """Returns cancel button of the remove from album popover."""
162
 
        return self.app.select_single("Button",
163
 
                                      objectName="removeFromAlbumCancelButton",
164
 
                                      visible=True)
 
162
        return self.app.wait_select_single(
 
163
            "Button",
 
164
            objectName="removeFromAlbumCancelButton",
 
165
            visible=True)
165
166
 
166
167
    def _ensure_remove_from_album_dialog_is_open(self):
167
168
        """Ensure that the remove from album dialog is fully opened."""
 
169
        self.assertThat(self._remove_from_album_dialog_shown,
 
170
                        Eventually(Is(True)))
168
171
        remove_dialog = self._get_remove_from_album_dialog()
169
172
        self.assertThat(remove_dialog.visible, Eventually(Equals(True)))
170
173
        self.assertThat(remove_dialog.opacity, Eventually(Equals(1)))