Skip to content

Commit 1424fe9

Browse files
committed
Make tests less flaky
1 parent dc3242c commit 1424fe9

6 files changed

Lines changed: 30 additions & 0 deletions

File tree

packages/pluggableWidgets/image-native/e2e/specs/maestro/Image_dynamic.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@ appId: "${APP_ID}"
88
text: "Image"
99
- tapOn:
1010
text: "Image dynamic"
11+
# Because the image loading can take some time due to resources on emulator, we need to wait for the image to be visible
12+
- extendedWaitUntil:
13+
visible: randText # Any random text that does not exist in the UI
14+
optional: true # This should be true so that the test won't fail
15+
timeout: 15000 # 15 seconds
1116
- takeScreenshot:
1217
path: "maestro/images/actual/${PLATFORM}/image_dynamic"

packages/pluggableWidgets/image-native/e2e/specs/maestro/Image_static.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,10 @@ appId: "${APP_ID}"
1010
text: "Image static"
1111
- assertVisible:
1212
text: "Main as Static Image; Default as Static; Background as Contain"
13+
# Because the image loading can take some time due to resources on emulator, we need to wait for the image to be visible
14+
- extendedWaitUntil:
15+
visible: randText # Any random text that does not exist in the UI
16+
optional: true # This should be true so that the test won't fail
17+
timeout: 15000 # 15 seconds
1318
- takeScreenshot:
1419
path: "maestro/images/actual/${PLATFORM}/image_static"

packages/pluggableWidgets/pie-doughnut-chart-native/e2e/specs/maestro/Doughnut_chart_custom.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,10 @@ appId: "${APP_ID}"
1010
text: "Doughnut chart Custom style"
1111
- assertVisible:
1212
id: "container1"
13+
# Because the image loading can take some time due to resources on emulator, we need to wait for the image to be visible
14+
- extendedWaitUntil:
15+
visible: randText # Any random text that does not exist in the UI
16+
optional: true # This should be true so that the test won't fail
17+
timeout: 15000 # 15 seconds
1318
- takeScreenshot:
1419
path: "maestro/images/actual/${PLATFORM}/doughnut_chart_custom"

packages/pluggableWidgets/pie-doughnut-chart-native/e2e/specs/maestro/Doughnut_chart_multiple_data_points.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ appId: "${APP_ID}"
1010
text: "Doughnut chart Multiple data points"
1111
- assertVisible:
1212
id: "container1"
13+
# Because the image loading can take some time due to resources on emulator, we need to wait for the image to be visible
14+
- extendedWaitUntil:
15+
visible: randText # Any random text that does not exist in the UI
16+
optional: true # This should be true so that the test won't fail
17+
timeout: 15000 # 15 seconds
1318
- takeScreenshot:
1419
path: "maestro/images/actual/${PLATFORM}/doughnut_chart_multiple_data_points"
1520

packages/pluggableWidgets/pie-doughnut-chart-native/e2e/specs/maestro/Pie_chart_custom.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,10 @@ appId: "${APP_ID}"
1212
id: "container1"
1313
- assertVisible:
1414
id: "innerView"
15+
# Because the image loading can take some time due to resources on emulator, we need to wait for the image to be visible
16+
- extendedWaitUntil:
17+
visible: randText # Any random text that does not exist in the UI
18+
optional: true # This should be true so that the test won't fail
19+
timeout: 15000 # 15 seconds
1520
- takeScreenshot:
1621
path: "maestro/images/actual/${PLATFORM}/pie_chart_custom"

packages/pluggableWidgets/pie-doughnut-chart-native/e2e/specs/maestro/Pie_chart_multiple_data_points.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,10 @@ appId: "${APP_ID}"
1212
id: "container1"
1313
- assertVisible:
1414
id: "innerView"
15+
# Because the image loading can take some time due to resources on emulator, we need to wait for the image to be visible
16+
- extendedWaitUntil:
17+
visible: randText # Any random text that does not exist in the UI
18+
optional: true # This should be true so that the test won't fail
19+
timeout: 15000 # 15 seconds
1520
- takeScreenshot:
1621
path: "maestro/images/actual/${PLATFORM}/pie_chart_multiple_data_points"

0 commit comments

Comments
 (0)