Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .maestro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ bun run maestro:test:android
Use `bun run maestro:smoke` to run only the smoke flow.
`maestro:debug` writes failure artifacts to `.maestro/debug-output`.

The smoke flow targets the example app ID `com.pagerviewexample` and verifies the Basic Example pager using stable `testID` selectors.
Additional Basic Example regression flows live in `.maestro/basic_example`.
Nested PagerView regression flows live in `.maestro/nested_pager_view_example`.
The smoke flow targets the example app ID `com.pagerviewexample` and verifies the horizontal pager using stable `testID` selectors.

Basic PagerView regression coverage is split into three deterministic flows:

- `tests/pager_basic_example.yaml` verifies horizontal paging in LTR.
- `tests/pager_vertical_basic_example.yaml` verifies vertical paging in LTR.
- `tests/pager_rtl_example.yaml` switches to RTL before verifying the reversed horizontal gesture.

Shared setup and assertions live in `flows/basic-pager`. Each flow resets the app to the required layout direction, so a failed RTL run cannot affect the next test.
22 changes: 22 additions & 0 deletions .maestro/flows/basic-pager/ensure-ltr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
appId: com.pagerviewexample
---
- launchApp:
stopApp: true

- extendedWaitUntil:
visible:
text: 'PagerView Example'
timeout: 15000

- runFlow:
when:
visible:
id: 'layout-direction-rtl'
commands:
- tapOn:
id: 'layout-direction-rtl'

- extendedWaitUntil:
visible:
id: 'layout-direction-ltr'
timeout: 15000
22 changes: 22 additions & 0 deletions .maestro/flows/basic-pager/ensure-rtl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
appId: com.pagerviewexample
---
- launchApp:
stopApp: true

- extendedWaitUntil:
visible:
text: 'PagerView Example'
timeout: 15000

- runFlow:
when:
visible:
id: 'layout-direction-ltr'
commands:
- tapOn:
id: 'layout-direction-ltr'

- extendedWaitUntil:
visible:
id: 'layout-direction-rtl'
timeout: 15000
12 changes: 12 additions & 0 deletions .maestro/flows/basic-pager/open.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
appId: com.pagerviewexample
---
- tapOn:
id: ${EXAMPLE_ID}

- extendedWaitUntil:
visible:
id: ${PAGER_ID}
timeout: 10000

- assertVisible:
id: 'pageNumber0'
52 changes: 52 additions & 0 deletions .maestro/flows/basic-pager/verify-controls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
appId: com.pagerviewexample
---
- tapOn:
id: 'next-page-button'

- extendedWaitUntil:
visible:
id: 'pageNumber2'
timeout: 5000

- tapOn:
id: 'prev-page-button'

- extendedWaitUntil:
visible:
id: 'pageNumber1'
timeout: 5000

- tapOn:
id: 'start-page-button'

- extendedWaitUntil:
visible:
id: 'pageNumber0'
timeout: 5000

- tapOn:
id: 'last-page-button'

- extendedWaitUntil:
visible:
id: 'pageNumber9'
timeout: 5000

- tapOn:
id: 'remove-page-button'

- extendedWaitUntil:
visible:
id: 'pageNumber8'
timeout: 5000

- tapOn:
id: 'add-page-button'

- tapOn:
id: 'next-page-button'

- extendedWaitUntil:
visible:
id: 'pageNumber9'
timeout: 5000
29 changes: 29 additions & 0 deletions .maestro/flows/basic-pager/verify-horizontal-ltr-swipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
appId: com.pagerviewexample
---
- tapOn:
id: 'scroll-enabled-button'

- swipe:
from:
id: 'pager-view-horizontal'
start: 90%, 50%
end: 10%, 50%
duration: 100

- assertVisible:
id: 'pageNumber0'

- tapOn:
id: 'scroll-enabled-button'

- swipe:
from:
id: 'pager-view-horizontal'
start: 90%, 50%
end: 10%, 50%
duration: 100

- extendedWaitUntil:
visible:
id: 'pageNumber1'
timeout: 5000
29 changes: 29 additions & 0 deletions .maestro/flows/basic-pager/verify-horizontal-rtl-swipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
appId: com.pagerviewexample
---
- tapOn:
id: 'scroll-enabled-button'

- swipe:
from:
id: 'pager-view-horizontal'
start: 10%, 50%
end: 90%, 50%
duration: 100

- assertVisible:
id: 'pageNumber0'

- tapOn:
id: 'scroll-enabled-button'

- swipe:
from:
id: 'pager-view-horizontal'
start: 10%, 50%
end: 90%, 50%
duration: 100

- extendedWaitUntil:
visible:
id: 'pageNumber1'
timeout: 5000
27 changes: 27 additions & 0 deletions .maestro/flows/basic-pager/verify-vertical-swipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
appId: com.pagerviewexample
---
- tapOn:
id: 'scroll-enabled-button'

- swipe:
from:
id: 'pager-view-vertical'
direction: UP
duration: 100

- assertVisible:
id: 'pageNumber0'

- tapOn:
id: 'scroll-enabled-button'

- swipe:
from:
id: 'pager-view-vertical'
direction: UP
duration: 100

- extendedWaitUntil:
visible:
id: 'pageNumber1'
timeout: 5000
20 changes: 20 additions & 0 deletions .maestro/setup/issue_1098_nested_pager_repro_setup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
appId: ${APP_ID}
---
- launchApp

# The issue examples are below the fundamental examples on the home screen.
- scrollUntilVisible:
element:
id: 'Issue #1098 Nested Pager Repro'
direction: DOWN

- tapOn:
id: 'Issue #1098 Nested Pager Repro'

- extendedWaitUntil:
visible:
id: 'issue-1098-outer-pager'
timeout: 10000

- assertVisible:
id: 'issue-1098-refresh-outer-pages'
7 changes: 0 additions & 7 deletions .maestro/setup/pager_basic_example_setup.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .maestro/setup/pager_vertical_basic_example_setup.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions .maestro/smoke-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ tags:

- extendedWaitUntil:
visible:
id: 'Basic Example'
id: 'example-basic-horizontal'
timeout: 15000

- tapOn:
id: 'Basic Example'
id: 'example-basic-horizontal'

- extendedWaitUntil:
visible:
id: 'pager-view'
id: 'pager-view-horizontal'
timeout: 10000

- assertVisible:
Expand Down
47 changes: 47 additions & 0 deletions .maestro/tests/issue_1098_nested_pager_repro.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
appId: com.pagerviewexample
tags:
- ios
- regression
---
- runFlow: ../setup/issue_1098_nested_pager_repro_setup.yaml

# Changing the outer page count remounts its SwiftUI page controllers while the
# nested pager remains mounted. The app must remain responsive after each change.
- tapOn:
id: 'issue-1098-refresh-outer-pages'

- extendedWaitUntil:
visible: 'Refreshes: 1'
timeout: 5000

- swipe:
from:
id: 'issue-1098-outer-pager'
# Percentages are screen-relative in Maestro. 40% is the outer page title,
# above the nested pager, so this gesture reaches the outer pager.
start: 90%, 40%
end: 10%, 40%
duration: 500

- extendedWaitUntil:
visible: 'Outer page 2'
timeout: 5000

- swipe:
from:
id: 'issue-1098-outer-pager'
start: 10%, 40%
end: 90%, 40%
duration: 500

- extendedWaitUntil:
visible:
id: 'issue-1098-inner-pager'
timeout: 5000

- tapOn:
id: 'issue-1098-refresh-outer-pages'

- extendedWaitUntil:
visible: 'Refreshes: 2'
timeout: 5000
55 changes: 10 additions & 45 deletions .maestro/tests/pager_basic_example.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,12 @@
appId: com.pagerviewexample
---
- runFlow: ../setup/pager_basic_example_setup.yaml
- tapOn: 'Scroll Enabled'
- swipe:
from:
id: 'pager-view'
start: 90%, 50%
end: 10%, 50%
duration: 100
- assertVisible:
text: 'page number 0'
- tapOn: 'Scroll Disabled'
- swipe:
from:
id: 'pager-view'
start: 90%, 50%
end: 10%, 50%
duration: 100
- assertVisible:
text: 'page number 1'
- tapOn:
id: 'next-page-button'
- assertVisible:
text: 'page number 2'
- tapOn:
id: 'prev-page-button'
- assertVisible:
text: 'page number 1'
- tapOn:
id: 'start-page-button'
- assertVisible:
text: 'page number 0'
- tapOn:
id: 'last-page-button'
- assertVisible:
text: 'page number 9'
- tapOn:
id: 'remove-page-button'
- assertVisible:
text: 'page number 8'
- tapOn:
id: 'add-page-button'
- tapOn:
id: 'next-page-button'
- assertVisible:
text: 'page number 9'
- runFlow: ../flows/basic-pager/ensure-ltr.yaml

- runFlow:
file: ../flows/basic-pager/open.yaml
env:
EXAMPLE_ID: 'example-basic-horizontal'
PAGER_ID: 'pager-view-horizontal'

- runFlow: ../flows/basic-pager/verify-horizontal-ltr-swipe.yaml
- runFlow: ../flows/basic-pager/verify-controls.yaml
12 changes: 12 additions & 0 deletions .maestro/tests/pager_rtl_example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
appId: com.pagerviewexample
---
- runFlow: ../flows/basic-pager/ensure-rtl.yaml

- runFlow:
file: ../flows/basic-pager/open.yaml
env:
EXAMPLE_ID: 'example-basic-horizontal'
PAGER_ID: 'pager-view-horizontal'

- runFlow: ../flows/basic-pager/verify-horizontal-rtl-swipe.yaml
- runFlow: ../flows/basic-pager/verify-controls.yaml
Loading
Loading