Skip to content

Commit 2cf6f6a

Browse files
committed
Add resilience to AddMedia command test
The media store might take time to add the image to the list, so include a retry.
1 parent cb95587 commit 2cf6f6a

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

e2e/demo_app/.maestro/commands/addMedia.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@ tags:
66

77
- addMedia:
88
- ../assets/image.png
9-
9+
1010
- launchApp: com.google.android.documentsui # Files app
1111

12-
- tapOn: Show roots
13-
- tapOn: Images
14-
- tapOn: Pictures
15-
- assertVisible: image.png
12+
# The image is inserted into MediaStore immediately, but the Files app caches
13+
# its album listing and does not always re-query in time to show the new file.
14+
# Re-navigate into Pictures on each attempt so documentsui issues a fresh query.
15+
- retry:
16+
maxRetries: 4
17+
commands:
18+
- tapOn: Show roots
19+
- tapOn: Images
20+
- tapOn: Pictures
21+
- assertVisible: image.png
1622
- longPressOn: image.png
1723
- tapOn: Search # The picture of the bin...
1824
- tapOn: OK

0 commit comments

Comments
 (0)