diff --git a/apps/native-component-list/src/screens/UI/ModifiersScreen.ios.tsx b/apps/native-component-list/src/screens/UI/ModifiersScreen.ios.tsx index 7cb4c07d064b4c..f34743ea8d02aa 100644 --- a/apps/native-component-list/src/screens/UI/ModifiersScreen.ios.tsx +++ b/apps/native-component-list/src/screens/UI/ModifiersScreen.ios.tsx @@ -142,6 +142,9 @@ export default function ModifiersScreen() { { key: 'bottom', label: 'Bottom' }, ]; + // `bar` has no tvOS counterpart and leaves the view unpainted there, so it comes last. + const materials = ['ultraThin', 'thin', 'regular', 'thick', 'ultraThick', 'bar'] as const; + const badgeType = ['standard', 'increased', 'decreased'] as const; const [badgeIndex, setBadgeIndex] = useState(0); @@ -165,7 +168,10 @@ export default function ModifiersScreen() { width: dimensions.width, }), ]}> -
+ {/* The same `ShapeStyle` values work in every modifier that paints an area: + here the backdrop is painted with `foregroundStyle` and the labels on top + of it with `background`. */} +
- - Frosted - + + + Frosted + + {materials.map((material) => ( + + {material} + + ))} + + linearGradient + +
diff --git a/apps/native-component-list/src/screens/UI/SliderScreen.android.tsx b/apps/native-component-list/src/screens/UI/SliderScreen.android.tsx index 7e49b122d41152..bf9e955f3e6821 100644 --- a/apps/native-component-list/src/screens/UI/SliderScreen.android.tsx +++ b/apps/native-component-list/src/screens/UI/SliderScreen.android.tsx @@ -1,6 +1,7 @@ import { Host, Slider, + VerticalSlider, Shape, Row, Text as ComposeText, @@ -26,6 +27,8 @@ export default function SliderScreen() { const [rangeValue, setRangeValue] = React.useState(2); const [colorsValue, setColorsValue] = React.useState(0.5); const [fullCustomValue, setFullCustomValue] = React.useState(0.5); + const [verticalValue, setVerticalValue] = React.useState(0.25); + const [reversedVerticalValue, setReversedVerticalValue] = React.useState(0.75); return ( @@ -36,6 +39,27 @@ export default function SliderScreen() { + + + Vertical + + Default direction on the left and reversed direction on the right. + + + + + + + Stepped diff --git a/apps/router-e2e/README.md b/apps/router-e2e/README.md index d0b0520d313670..e52ce4e67413a6 100644 --- a/apps/router-e2e/README.md +++ b/apps/router-e2e/README.md @@ -8,16 +8,6 @@ The runnable projects are located in the `__e2e__` directory. We use scripts in To run the E2E tests, navigate to `packages/@expo/cli` and run `pnpm test:e2e `, or `pnpm test:playwright ` -### Maestro E2E Tests - -To run the tests for native navigation, in the `apps/router-e2e` directory, run: - -```bash -pnpm test:e2e -``` - -This command will start the expo server and run the maestro tests located in the `__e2e__/native-navigation/__tests__` directory. - ### Native - Run `pnpm prebuild` to create the ios and android directories using the latest `expo-template-bare-minimum` template. diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/drawer/back-button.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/drawer/back-button.yml deleted file mode 100644 index 2716a72ab6ef3a..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/drawer/back-button.yml +++ /dev/null @@ -1,35 +0,0 @@ -env: - APP_ID: com.expo.routere2e -appId: ${APP_ID} -name: Drawer Android back button ---- -# Back button only exists on Android; this flow is a no-op on iOS. -- runFlow: - when: - platform: Android - commands: - - stopApp: ${APP_ID} - - openLink: router-e2e://drawer - - runFlow: ../close-warning.yml - - # Back closes an open drawer instead of navigating away - - tapOn: - id: "e2e-open-drawer" - - waitForAnimationToEnd - - assertVisible: "Drawer Home" - - assertVisible: "Drawer Second" - - back - - waitForAnimationToEnd - - assertVisible: "closed" - - assertVisible: "Home screen" - - # With the drawer closed, back returns to the drawer's first route - - tapOn: - id: "e2e-goto-second" - - assertVisible: "Second screen" - - back - - waitForAnimationToEnd - - assertVisible: "Home screen" - - assertVisible: - id: "e2e-pathname" - text: "/drawer" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/drawer/default-open.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/drawer/default-open.yml deleted file mode 100644 index 5e8a715854aa81..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/drawer/default-open.yml +++ /dev/null @@ -1,20 +0,0 @@ -env: - APP_ID: com.expo.routere2e -appId: ${APP_ID} -name: Drawer defaultStatus open ---- -- stopApp: ${APP_ID} -- openLink: router-e2e://drawer-open -- runFlow: ../close-warning.yml -- waitForAnimationToEnd - -# Drawer starts open: the drawer item label is only visible while open -# (the header title is 'Open Home', distinct on purpose). -- assertVisible: "Open Drawer Item" - -# Close by tapping the scrim right of the drawer -- tapOn: - point: "95%,50%" -- waitForAnimationToEnd -- assertVisible: "closed" -- assertNotVisible: "Open Drawer Item" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/drawer/open-navigate.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/drawer/open-navigate.yml deleted file mode 100644 index a5fe49cf648969..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/drawer/open-navigate.yml +++ /dev/null @@ -1,34 +0,0 @@ -env: - APP_ID: com.expo.routere2e -appId: ${APP_ID} -name: Drawer open and navigate ---- -- stopApp: ${APP_ID} -- openLink: router-e2e://drawer -- runFlow: ../close-warning.yml -- assertVisible: "Home screen" -- assertVisible: "closed" - -# Open drawer imperatively -- tapOn: - id: "e2e-open-drawer" -- waitForAnimationToEnd -- assertVisible: "Drawer Home" -- assertVisible: "Drawer Second" - -# Drawer item press navigates and closes the drawer -- tapOn: "Drawer Second" -- waitForAnimationToEnd -- assertVisible: "Second screen" -- assertVisible: "/drawer/second" -- assertVisible: "closed" - -# Navigate back to Home via the default header toggle button -- tapOn: "Show navigation menu" -- waitForAnimationToEnd -- assertVisible: "Drawer Home" -- assertVisible: "Drawer Second" -- tapOn: "Drawer Home" -- waitForAnimationToEnd -- assertVisible: "Home screen" -- assertVisible: "/drawer" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/button-press.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/button-press.yml deleted file mode 100644 index 24c5a996d76c2d..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/button-press.yml +++ /dev/null @@ -1,23 +0,0 @@ -appId: com.expo.routere2e -name: Header Items button press ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://header-items?leftButton1=1&leftButton2=1&leftCustomItem=1&rightButton=1&searchButton=1 -- runFlow: ../close-warning.yml -- assertVisible: "Stack Header Items E2E Test Screen" -- tapOn: "Left" -- assertVisible: "First left button pressed" -- tapOn: "OK" -- tapOn: "Button 2" -- assertVisible: "Second left button pressed" -- tapOn: "OK" -- tapOn: - id: "custom-header-element" -- assertVisible: "Custom header element pressed!" -- tapOn: "OK" -- tapOn: "Right" -- assertVisible: "Right button pressed" -- tapOn: "OK" -- tapOn: "Search" -- assertVisible: "Search button pressed" -- tapOn: "OK" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/button-selected.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/button-selected.yml deleted file mode 100644 index c8781d3739643a..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/button-selected.yml +++ /dev/null @@ -1,17 +0,0 @@ -appId: com.expo.routere2e -name: Header Items button selected state ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://header-items?leftButton2=1 -- runFlow: ../close-warning.yml -- assertVisible: "Stack Header Items E2E Test Screen" -# TODO: Add screenshots comparison -- takeScreenshot: header-items-button-not-selected -- tapOn: - id: toggle-left-button-2-selected -- takeScreenshot: header-items-button-selected -- tapOn: - id: toggle-left-button-2-selected -- tapOn: - id: toggle-left-button-2-separate-background -- takeScreenshot: header-items-button-separate-background diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/hide-show.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/hide-show.yml deleted file mode 100644 index c7bdc3bebe26cf..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/hide-show.yml +++ /dev/null @@ -1,38 +0,0 @@ -appId: com.expo.routere2e -name: Header Items hide-show ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://header-items -- runFlow: ../close-warning.yml -- assertVisible: "Stack Header Items E2E Test Screen" -- tapOn: - id: "toggle-left-button-1" -- assertVisible: "Left" -- tapOn: - id: "toggle-left-button-1" -- assertNotVisible: "Left" -- tapOn: - id: "toggle-left-button-2" -- assertVisible: "Button 2" -- assertVisible: "33" -- tapOn: - id: "toggle-left-button-2" -- assertNotVisible: "Button 2" -- tapOn: - id: "toggle-left-custom-item" -- assertVisible: - id: "custom-header-element" -- tapOn: - id: "toggle-left-custom-item" -- assertNotVisible: - id: "custom-header-element" -- tapOn: - id: "toggle-right-menu-1" -- assertVisible: "Menu" -- assertVisible: "99" -- tapOn: - id: "toggle-right-button" -- assertVisible: "Right" -- tapOn: - id: "toggle-search-button" -- assertVisible: "Search" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/left-menu.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/left-menu.yml deleted file mode 100644 index 39acf39b4ecf5d..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/left-menu.yml +++ /dev/null @@ -1,21 +0,0 @@ -appId: com.expo.routere2e -name: Header Items left menu ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://header-items?leftMenu=1 -- runFlow: ../close-warning.yml -- assertVisible: "Stack Header Items E2E Test Screen" -- assertVisible: "Left Menu" -- assertVisible: "99" -- tapOn: "Left Menu" -- assertVisible: "Option 1" -- assertVisible: - id: "1.circle" -- assertVisible: "Option 2" -- assertVisible: - id: "2.circle" -- assertVisible: - id: "checkmark" -- tapOn: "Option 1" -- assertVisible: "Option 1" -- tapOn: "OK" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/menu-states.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/menu-states.yml deleted file mode 100644 index 146cdd985b4831..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/menu-states.yml +++ /dev/null @@ -1,30 +0,0 @@ -appId: com.expo.routere2e -name: Header Items menu states ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://header-items?rightMenu1=1 -- runFlow: ../close-warning.yml -- assertVisible: "Stack Header Items E2E Test Screen" -- tapOn: "Menu" -- assertVisible: "Archive emails" -- tapOn: "Archive emails" -- assertVisible: "Archived emails" -- tapOn: "OK" -- tapOn: "Menu" -- assertVisible: "Unarchive emails" -- assertVisible: - id: "checkmark" -- tapOn: "View Mode" -- assertVisible: "Icons" -- assertVisible: "List" -- tapOn: "List" -- assertVisible: "Changed to list view" -- tapOn: "OK" -- tapOn: "Menu" -- assertVisible: "View Mode" -- assertVisible: - id: "checkmark" - index: 1 -- tapOn: "Icons" -- assertVisible: "Changed to icons view" -- tapOn: "OK" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/menu.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/menu.yml deleted file mode 100644 index ed372d9aa6548d..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/header-items/menu.yml +++ /dev/null @@ -1,60 +0,0 @@ -appId: com.expo.routere2e -name: Header Items menu ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://header-items?rightMenu1=1 -- runFlow: ../close-warning.yml -- assertVisible: "Stack Header Items E2E Test Screen" -- tapOn: "Menu" -- assertVisible: "Send email" -- assertVisible: - id: "paperplane" -- assertVisible: "Delete email" -- assertVisible: - id: "trash" -- assertVisible: "Archive emails" -- assertVisible: - id: "tray" -- assertVisible: "View Mode" -- assertVisible: "Icons" -- assertVisible: - id: "checkmark" - index: 0 -- assertVisible: "List" -- assertVisible: "Sort By" -- assertVisible: "Name, Ascending" -- assertVisible: - id: "checkmark" - index: 1 -# Menu is too long to fit fully -- swipe: - from: - text: Icons - direction: UP -- assertVisible: "Preferences" -- assertVisible: "Quick Actions" -- assertVisible: "Locked action" -- assertVisible: - id: "lock" -- tapOn: "Preferences" -- assertVisible: "Preferences" -- assertVisible: "Disable notifications" -- assertVisible: "Favorite Color" -- assertVisible: "Red" -- assertVisible: "Blue" -- assertVisible: - id: "checkmark" - index: 1 -- assertVisible: "Green" -- tapOn: "Preferences" -- assertVisible: "Tags" -- tapOn: "Quick Actions" -- assertVisible: - id: "star" -- assertVisible: - id: "flag" -- assertVisible: - id: "pin" -- tapOn: "Star" -- assertVisible: "Star" -- tapOn: "OK" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/link-preview-menu.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/link-preview-menu.yml deleted file mode 100644 index bc596bb80d9697..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/link-preview-menu.yml +++ /dev/null @@ -1,42 +0,0 @@ -appId: com.expo.routere2e -name: Link preview menu ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://tabs -- runFlow: ../close-warning.yml -- assertVisible: "Index screen" - -- scrollUntilVisible: - element: - id: "index-link-menu" - direction: "DOWN" -- assertVisible: "Last menu action pressed: none" -- longPressOn: - id: "index-link-menu" -- assertVisible: "0.circle" -- assertVisible: "Action 1" -- assertVisible: "1.circle" -- assertVisible: "Action 2" -- assertVisible: "2.circle" -- assertVisible: "Action 3" -- assertVisible: - id: star.fill -- assertVisible: - id: flag.fill -- assertVisible: - id: pin.fill -- assertVisible: - id: "arrow.clockwise" -- assertVisible: - id: "arrow.2.circlepath" -- assertVisible: - id: "pin" -- assertNotVisible: "3.circle" -- assertVisible: "Submenu" -- tapOn: "Submenu" -- assertVisible: "3.circle" -- tapOn: "Action 4" -- assertVisible: "Last menu action pressed: Action 4" - - - diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/link-preview-tabs.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/link-preview-tabs.yml deleted file mode 100644 index b58b40e864d92b..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/link-preview-tabs.yml +++ /dev/null @@ -1,28 +0,0 @@ -appId: com.expo.routere2e -name: Link preview tabs ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://tabs -- runFlow: ../close-warning.yml -- assertVisible: "Index screen" -- runFlow: ../assert-all-tabs-visible.yml -- runFlow: ../assert-accessory-visible.yml - -# Navigate to Faces tab -- longPressOn: - id: "link-face-0" -- assertVisible: "Face 0" -- tapOn: "Face 0" -- assertVisible: "systemBlue" -- runFlow: ../assert-all-tabs-visible.yml -- runFlow: ../assert-accessory-visible.yml -- assertVisible: - id: "BackButton" - -- tapOn: - id: "BackButton" -- assertVisible: "Face Gallery" -- runFlow: ../assert-all-tabs-visible.yml -- runFlow: ../assert-accessory-visible.yml - - diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/link-preview.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/link-preview.yml deleted file mode 100644 index 9b7fe00ed611d0..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/link-preview.yml +++ /dev/null @@ -1,14 +0,0 @@ -appId: com.expo.routere2e -name: Link preview ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://tabs/faces -- runFlow: ../close-warning.yml -- assertVisible: "Face Gallery" -- longPressOn: - id: "link-face-0" -- assertVisible: "Face 0" -- tapOn: "Face 0" -- assertVisible: "systemBlue" -- assertVisible: - id: "BackButton" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/native-tabs-minimize.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/native-tabs-minimize.yml deleted file mode 100644 index 0707ba1dab8ffd..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/native-tabs-minimize.yml +++ /dev/null @@ -1,59 +0,0 @@ -appId: com.expo.routere2e -name: Native tabs minimize behavior ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://tabs -- runFlow: ../close-warning.yml -# Base tabs -- assertVisible: "Index screen" -- runFlow: ../assert-all-tabs-visible.yml -- runFlow: ../assert-accessory-visible.yml -# Ensuring that accessory is in expanded state -- assertVisible: - id: "forward-button" -# Changing play state -- assertVisible: - id: "play-button" -- tapOn: - id: "play-button" -- assertNotVisible: - id: "play-button" -- assertVisible: - id: "pause-button" - -# Scroll down to minimize -- scrollUntilVisible: - element: - text: "Item 25" - direction: "DOWN" -- runFlow: ../assert-accessory-visible.yml -- assertVisible: - id: "pause-button" -# Inline state -- assertNotVisible: - id: "forward-button" -- assertVisible: "applewatch.side.right" -- assertNotVisible: "lock.applewatch" -- assertNotVisible: "figure.disc.sports" -- assertNotVisible: "Dynamic" -# Scroll up to maximize -- scrollUntilVisible: - element: - text: "Index screen" - direction: "UP" -# ensuring that the scroll view is fully scrolled to top -# we need to scroll down and up again. Otherwise the bottom accessory state might persist -- swipe: - start: 50%,60% - end: 50%,40% - duration: 200 -- swipe: - start: 50%,10% - end: 50%,60% - duration: 200 -- assertVisible: "Index screen" -- assertVisible: - id: "pause-button" -- assertVisible: - id: "forward-button" -- runFlow: ../assert-all-tabs-visible.yml diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/button-press.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/button-press.yml deleted file mode 100644 index d014e343afa354..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/button-press.yml +++ /dev/null @@ -1,12 +0,0 @@ -appId: com.expo.routere2e -name: Toolbar button press ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://toolbar -- runFlow: ../close-warning.yml -- assertVisible: "Toolbar E2E Test Screen" -- tapOn: - id: "custom-plus-button" -- assertVisible: "Plus button pressed!" -- tapOn: "OK" - diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/button-shares-background.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/button-shares-background.yml deleted file mode 100644 index cd7533bf43f534..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/button-shares-background.yml +++ /dev/null @@ -1,17 +0,0 @@ -appId: com.expo.routere2e -name: Toolbar shares background ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://toolbar?searchButton=true&micButton=true -- runFlow: ../close-warning.yml -- assertVisible: "Toolbar E2E Test Screen" -# TODO: Add screenshots comparison -- takeScreenshot: button-shares-background -- tapOn: - id: toggle-search-button-share-background -- takeScreenshot: button-does-not-share-background -- tapOn: - id: toggle-search-button-share-background -- tapOn: - id: toggle-search-button-hide-shared-background -- takeScreenshot: button-hides-shared-background diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/hide-show.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/hide-show.yml deleted file mode 100644 index 714b1e2c726e67..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/hide-show.yml +++ /dev/null @@ -1,28 +0,0 @@ -appId: com.expo.routere2e -name: Toolbar hide-show ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://toolbar -- runFlow: ../close-warning.yml -- assertVisible: "Toolbar E2E Test Screen" -- tapOn: - id: "toggle-search-button" -- tapOn: "Search" -- assertVisible: "Searching for: empty" -- tapOn: "OK" -- tapOn: - id: "toggle-mic-button" -- assertVisible: "microphone" -- assertVisible: "search" -- tapOn: - id: "toggle-custom-view" -- assertVisible: - id: "toolbar-search-input" -- tapOn: - id: "toggle-search-button" -- assertNotVisible: - text: "undefined" - index: 1 -- tapOn: - id: "toggle-menu" -- assertVisible: "Actions" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/menu.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/menu.yml deleted file mode 100644 index ca67a39e70d323..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/menu.yml +++ /dev/null @@ -1,98 +0,0 @@ -appId: com.expo.routere2e -name: Toolbar menu ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://toolbar?menu=1 -- runFlow: ../close-warning.yml -- assertVisible: "Toolbar E2E Test Screen" -- tapOn: "Actions" -- assertVisible: "Send email" -- assertVisible: - id: "paperplane" -- assertVisible: "Delete email" -- assertVisible: - id: "trash" -- assertVisible: "Archive emails" -- assertVisible: - id: "tray" -- assertVisible: "Organize" -- assertVisible: "Move to folder" -- assertVisible: - id: "folder" -- assertVisible: "Add tag" -- assertVisible: - id: "tag" -- assertVisible: "Preferences" -- assertVisible: "Palette Actions" -- assertVisible: "Star-palette" -- assertVisible: - id: "star" -- assertVisible: "Flag-palette" -- assertVisible: - id: "flag" -- assertVisible: "Pin-palette" -- assertVisible: - id: "pin" -- assertVisible: "Small Actions" -- assertVisible: "Star" -- assertVisible: - id: "star.fill" -- assertVisible: "Flag" -- assertVisible: - id: "flag.fill" -- assertVisible: "Pin" -- assertVisible: - id: "pin.fill" -- swipe: - start: 5%, 90% - end: 5%, 50% - duration: 100 -- assertVisible: "Medium Size" -- assertVisible: "Refresh" -- assertVisible: - id: "arrow.clockwise" -- assertVisible: "Resume" -- assertVisible: - id: "arrow.2.circlepath" -- assertVisible: "Large Size" -- assertVisible: "Share" -- assertVisible: - id: "square.and.arrow.up" -- assertVisible: "Copy" -- assertVisible: - id: "doc.on.doc" -- assertVisible: "Locked action" -- assertVisible: - id: "lock" -- tapOn: "Preferences" -- assertVisible: "Preferences" -- assertVisible: "Disable notifications" -- assertVisible: "Red" -- assertVisible: "Blue" -- assertVisible: - id: "checkmark" - index: 1 -- assertNotVisible: - id: "checkmark" - index: 2 -- assertVisible: "Green" -- assertVisible: "Favorite Color" -- tapOn: "Preferences" -- assertVisible: "Large Size" -- assertVisible: "Share" -- tapOn: "Share" -- assertVisible: "Sharing" -- tapOn: "OK" -- tapOn: "Actions" -- tapOn: "Preferences" -- tapOn: "Red" -- assertVisible: "You selected red" -- tapOn: "OK" -- tapOn: "Actions" -- tapOn: "Preferences" -- assertVisible: - id: "checkmark" - index: 1 -- assertVisible: - id: "checkmark" - index: 2 diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/search-bar.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/search-bar.yml deleted file mode 100644 index d9c667a2cc10ba..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/search-bar.yml +++ /dev/null @@ -1,26 +0,0 @@ -appId: com.expo.routere2e -name: Toolbar search bar -jsEngine: graaljs ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://toolbar?searchBar=true -- runFlow: ../close-warning.yml -- assertVisible: "Toolbar E2E Test Screen" -- tapOn: Search -- assertVisible: 'Search Text: ""' -- assertVisible: "Search Focused: Yes" -- assertVisible: This is toolbar searchbar -- tapOn: This is toolbar searchbar -- inputText: Hello World -- scrollUntilVisible: - element: "Search Focused: Yes" -- assertVisible: 'Search Text: "Hello World"' -- tapOn: close -- assertVisible: 'Search Text: ""' -- assertVisible: "Search Focused: No" -- tapOn: - id: toggle-search-bar -- assertNotVisible: Search -- tapOn: - id: toggle-search-bar -- assertVisible: Search diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/spacer.yml b/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/spacer.yml deleted file mode 100644 index 54ff31693262be..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/toolbar/spacer.yml +++ /dev/null @@ -1,36 +0,0 @@ -appId: com.expo.routere2e -name: Toolbar spacer -jsEngine: graaljs ---- -- stopApp: com.expo.routere2e -- openLink: router-e2e://toolbar?searchButton=true&micButton=true -- runFlow: ../close-warning.yml -- assertVisible: "Toolbar E2E Test Screen" -- tapOn: - id: toggle-fixed-spacer -- tapOn: - point: 27%, 92% -- assertVisible: "Searching for: empty" -- tapOn: OK -- tapOn: - point: 48%,92% -- assertVisible: "Microphone" -- tapOn: OK -- longPressOn: - id: input-fixed-spacer-width -- tapOn: "Select All" -- inputText: "100" -- tapOn: Toolbar E2E Test Screen -- tapOn: - point: 17%, 92% -- assertVisible: "Searching for: empty" -- tapOn: OK -- tapOn: - point: 58%,92% -- assertVisible: "Microphone" -- tapOn: OK -# TODO: Add screenshots comparison -- takeScreenshot: spacer-not-shares-background -- tapOn: - id: toggle-fixed-spacer-share-background -- takeScreenshot: spacer-shares-background diff --git a/apps/router-e2e/__e2e__/native-navigation/app/icons.android.tsx b/apps/router-e2e/__e2e__/native-navigation/app/icons.android.tsx deleted file mode 100644 index 0ca8f0a06ab0fa..00000000000000 --- a/apps/router-e2e/__e2e__/native-navigation/app/icons.android.tsx +++ /dev/null @@ -1,6 +0,0 @@ -export const searchIcon = require('../../../assets/android-icons/search.xml'); -export const closeIcon = require('../../../assets/android-icons/close.xml'); -export const micIcon = require('../../../assets/android-icons/mic.xml'); -export const moreVertIcon = require('../../../assets/android-icons/more_vert.xml'); -export const sendIcon = require('../../../assets/android-icons/send.xml'); -export const deleteIcon = require('../../../assets/android-icons/delete.xml'); diff --git a/apps/router-e2e/maestro/test.sh b/apps/router-e2e/maestro/test.sh deleted file mode 100755 index 313f09e784a99a..00000000000000 --- a/apps/router-e2e/maestro/test.sh +++ /dev/null @@ -1,5 +0,0 @@ - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -trap "kill 0" EXIT -(cd "$SCRIPT_DIR/.." && pnpm start:native-navigation) > /dev/null 2>&1 & -(cd "$SCRIPT_DIR/../__e2e__/native-navigation" && maestro test __tests__/*/**) diff --git a/apps/router-e2e/package.json b/apps/router-e2e/package.json index 9f6f93d2db1bc7..78818ca522ed16 100644 --- a/apps/router-e2e/package.json +++ b/apps/router-e2e/package.json @@ -27,10 +27,6 @@ "start:universal-linking": "EXPO_USE_STATIC=server EXPO_TUNNEL_SUBDOMAIN=expo-e2e-universal-linking E2E_ROUTER_SRC=universal-linking expo start --tunnel", "open:universal-linking": "xcrun simctl terminate booted com.expo.routere2e && npx uri-scheme open https://expo-e2e-universal-linking.ngrok.io/post/123 --ios", "start:native-tabs": "E2E_ROUTER_SRC=native-tabs expo start", - "start:native-navigation": "E2E_ROUTER_SRC=native-navigation expo start", - "ios:native-navigation": "E2E_ROUTER_SRC=native-navigation expo run:ios", - "android:native-navigation": "E2E_ROUTER_SRC=native-navigation expo run:android", - "export:native-navigation": "EXPO_ATLAS=1 E2E_ROUTER_SRC=native-navigation expo export", "start:headless": "E2E_ROUTER_SRC=headless expo", "start:fast-refresh": "E2E_ROUTER_SRC=fast-refresh expo start -w", "start:middleware-async": "E2E_ROUTER_SRC=server-middleware-async EXPO_USE_STATIC=server E2E_ROUTER_SERVER_MIDDLEWARE=true expo start", @@ -60,8 +56,7 @@ "lint": "oxlint --config oxlint.config.mjs .", "format": "expo-module format", "android": "expo run:android", - "ios": "expo run:ios", - "test:e2e": "./maestro/test.sh" + "ios": "expo run:ios" }, "dependencies": { "@expo/dom-webview": "workspace:*", diff --git a/apps/router-tester/.gitignore b/apps/router-tester/.gitignore new file mode 100644 index 00000000000000..f25965cd078aa5 --- /dev/null +++ b/apps/router-tester/.gitignore @@ -0,0 +1,42 @@ +# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files + +# dependencies +node_modules/ + +# Expo +.expo/ +dist/ +web-build/ +expo-env.d.ts + +#prebuild +android/ +ios/ + +# Native +*.orig.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision + +# Metro +.metro-health-check* + +# debug +npm-debug.* +yarn-debug.* +yarn-error.* + +# macOS +.DS_Store +*.pem + +# local env files +.env*.local + +# typescript +*.tsbuildinfo + +app-example diff --git a/apps/router-tester/README.md b/apps/router-tester/README.md new file mode 100644 index 00000000000000..5ef46b9ee023c5 --- /dev/null +++ b/apps/router-tester/README.md @@ -0,0 +1,9 @@ +# Router Tester + +Run `pnpm prebuild` to generate the native projects, then run `pnpm ios` or `pnpm android` to build and launch the dev client. + +Run the Maestro test with: + +```bash +pnpm test:e2e +``` diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/.gitignore b/apps/router-tester/__tests__/.gitignore similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/__tests__/.gitignore rename to apps/router-tester/__tests__/.gitignore diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/assert-accessory-visible.yml b/apps/router-tester/__tests__/assert-accessory-visible.yml similarity index 68% rename from apps/router-e2e/__e2e__/native-navigation/__tests__/assert-accessory-visible.yml rename to apps/router-tester/__tests__/assert-accessory-visible.yml index 08664b26cb94fa..35a2e5360396f1 100644 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/assert-accessory-visible.yml +++ b/apps/router-tester/__tests__/assert-accessory-visible.yml @@ -1,4 +1,4 @@ -appId: com.expo.routere2e +appId: dev.expo.routertester --- - assertVisible: "Bad Habits" - assertVisible: "Ed Sheeran" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/assert-all-tabs-visible.yml b/apps/router-tester/__tests__/assert-all-tabs-visible.yml similarity index 85% rename from apps/router-e2e/__e2e__/native-navigation/__tests__/assert-all-tabs-visible.yml rename to apps/router-tester/__tests__/assert-all-tabs-visible.yml index 1ae0d89ad2cf14..6f5881c2a942c6 100644 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/assert-all-tabs-visible.yml +++ b/apps/router-tester/__tests__/assert-all-tabs-visible.yml @@ -1,4 +1,4 @@ -appId: com.expo.routere2e +appId: dev.expo.routertester --- - assertVisible: "applewatch.side.right" - assertVisible: "Index tab" diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/close-warning.yml b/apps/router-tester/__tests__/close-warning.yml similarity index 58% rename from apps/router-e2e/__e2e__/native-navigation/__tests__/close-warning.yml rename to apps/router-tester/__tests__/close-warning.yml index edcf4f84e92e36..e286d542088b99 100644 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/close-warning.yml +++ b/apps/router-tester/__tests__/close-warning.yml @@ -1,4 +1,4 @@ -appId: com.expo.routere2e +appId: dev.expo.routertester --- - runFlow: when: @@ -6,4 +6,4 @@ appId: com.expo.routere2e commands: - tapOn: point: 96%,93% - - assertNotVisible: "!, Open debugger to view warnings." \ No newline at end of file + - assertNotVisible: "!, Open debugger to view warnings." diff --git a/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/native-tabs.yml b/apps/router-tester/__tests__/tabs/native-tabs.yml similarity index 84% rename from apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/native-tabs.yml rename to apps/router-tester/__tests__/tabs/native-tabs.yml index e0c45fe918c5d7..9c199bc5dad0e5 100644 --- a/apps/router-e2e/__e2e__/native-navigation/__tests__/tabs/native-tabs.yml +++ b/apps/router-tester/__tests__/tabs/native-tabs.yml @@ -1,8 +1,8 @@ -appId: com.expo.routere2e +appId: dev.expo.routertester name: Native tabs --- -- stopApp: com.expo.routere2e -- openLink: router-e2e://tabs +- stopApp: dev.expo.routertester +- openLink: router-tester://tabs - runFlow: ../close-warning.yml - assertVisible: "Index screen" - runFlow: ../assert-all-tabs-visible.yml @@ -25,4 +25,3 @@ name: Native tabs - tapOn: id: "lock.applewatch" - assertVisible: "systemBlue" - diff --git a/apps/router-tester/app.json b/apps/router-tester/app.json new file mode 100644 index 00000000000000..a50338c5ea5a94 --- /dev/null +++ b/apps/router-tester/app.json @@ -0,0 +1,36 @@ +{ + "expo": { + "name": "Router Tester", + "slug": "router-tester", + "scheme": "router-tester", + "newArchEnabled": true, + "userInterfaceStyle": "automatic", + "icon": "./assets/icon.png", + "ios": { + "bundleIdentifier": "dev.expo.routertester", + "infoPlist": { + "ITSAppUsesNonExemptEncryption": false + } + }, + "android": { + "package": "dev.expo.routertester", + "adaptiveIcon": { + "foregroundImage": "./assets/icon.png", + "backgroundColor": "#FFFFFF" + } + }, + "plugins": [ + "expo-router" + ], + "experiments": { + "typedRoutes": true + }, + "extra": { + "router": {}, + "eas": { + "projectId": "0a92f596-9ce2-4793-8e36-d51059238417" + } + }, + "owner": "expo" + } +} diff --git a/apps/router-e2e/__e2e__/native-navigation/app/_layout.tsx b/apps/router-tester/app/_layout.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/_layout.tsx rename to apps/router-tester/app/_layout.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/composition-conflicts.tsx b/apps/router-tester/app/composition-conflicts.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/composition-conflicts.tsx rename to apps/router-tester/app/composition-conflicts.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/composition-lifecycle.tsx b/apps/router-tester/app/composition-lifecycle.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/composition-lifecycle.tsx rename to apps/router-tester/app/composition-lifecycle.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/composition-rerenders/[id].tsx b/apps/router-tester/app/composition-rerenders/[id].tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/composition-rerenders/[id].tsx rename to apps/router-tester/app/composition-rerenders/[id].tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/composition-rerenders/_layout.tsx b/apps/router-tester/app/composition-rerenders/_layout.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/composition-rerenders/_layout.tsx rename to apps/router-tester/app/composition-rerenders/_layout.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/composition-rerenders/index.tsx b/apps/router-tester/app/composition-rerenders/index.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/composition-rerenders/index.tsx rename to apps/router-tester/app/composition-rerenders/index.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/drawer-open/_layout.tsx b/apps/router-tester/app/drawer-open/_layout.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/drawer-open/_layout.tsx rename to apps/router-tester/app/drawer-open/_layout.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/drawer-open/index.tsx b/apps/router-tester/app/drawer-open/index.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/drawer-open/index.tsx rename to apps/router-tester/app/drawer-open/index.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/drawer/_layout.tsx b/apps/router-tester/app/drawer/_layout.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/drawer/_layout.tsx rename to apps/router-tester/app/drawer/_layout.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/drawer/index.tsx b/apps/router-tester/app/drawer/index.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/drawer/index.tsx rename to apps/router-tester/app/drawer/index.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/drawer/second.tsx b/apps/router-tester/app/drawer/second.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/drawer/second.tsx rename to apps/router-tester/app/drawer/second.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/_layout.tsx b/apps/router-tester/app/error-boundaries/_layout.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/_layout.tsx rename to apps/router-tester/app/error-boundaries/_layout.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/index.tsx b/apps/router-tester/app/error-boundaries/index.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/index.tsx rename to apps/router-tester/app/error-boundaries/index.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/navigator.tsx b/apps/router-tester/app/error-boundaries/navigator.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/navigator.tsx rename to apps/router-tester/app/error-boundaries/navigator.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/nested-without/_layout.tsx b/apps/router-tester/app/error-boundaries/nested-without/_layout.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/nested-without/_layout.tsx rename to apps/router-tester/app/error-boundaries/nested-without/_layout.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/nested-without/index.tsx b/apps/router-tester/app/error-boundaries/nested-without/index.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/nested-without/index.tsx rename to apps/router-tester/app/error-boundaries/nested-without/index.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/nested/_layout.tsx b/apps/router-tester/app/error-boundaries/nested/_layout.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/nested/_layout.tsx rename to apps/router-tester/app/error-boundaries/nested/_layout.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/nested/index.tsx b/apps/router-tester/app/error-boundaries/nested/index.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/nested/index.tsx rename to apps/router-tester/app/error-boundaries/nested/index.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/route.tsx b/apps/router-tester/app/error-boundaries/route.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/error-boundaries/route.tsx rename to apps/router-tester/app/error-boundaries/route.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/experimental-stack/_layout.tsx b/apps/router-tester/app/experimental-stack/_layout.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/experimental-stack/_layout.tsx rename to apps/router-tester/app/experimental-stack/_layout.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/experimental-stack/details.tsx b/apps/router-tester/app/experimental-stack/details.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/experimental-stack/details.tsx rename to apps/router-tester/app/experimental-stack/details.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/experimental-stack/index.tsx b/apps/router-tester/app/experimental-stack/index.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/experimental-stack/index.tsx rename to apps/router-tester/app/experimental-stack/index.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/experimental-stack/modal.tsx b/apps/router-tester/app/experimental-stack/modal.tsx similarity index 100% rename from apps/router-e2e/__e2e__/native-navigation/app/experimental-stack/modal.tsx rename to apps/router-tester/app/experimental-stack/modal.tsx diff --git a/apps/router-e2e/__e2e__/native-navigation/app/header-items.tsx b/apps/router-tester/app/header-items.tsx similarity index 98% rename from apps/router-e2e/__e2e__/native-navigation/app/header-items.tsx rename to apps/router-tester/app/header-items.tsx index e13b81876c6d05..66163f2be62bda 100644 --- a/apps/router-e2e/__e2e__/native-navigation/app/header-items.tsx +++ b/apps/router-tester/app/header-items.tsx @@ -137,7 +137,7 @@ export default function HeaderItemsScreen() { hidden={!showLeftButton2} separateBackground={leftButton2SeparateBackground} selected={leftButton2Selected} - icon={process.env.EXPO_OS === 'ios' ? 'star' : require('../../../assets/expo-logo.png')} + icon={process.env.EXPO_OS === 'ios' ? 'star' : require('@/assets/expo-logo.png')} iconRenderingMode={process.env.EXPO_OS === 'ios' ? 'template' : 'original'} onPress={handleLeftButton2Press} style={{ @@ -159,11 +159,7 @@ export default function HeaderItemsScreen() { color: '#00f', fontFamily: 'Arial', }} - icon={ - process.env.EXPO_OS === 'ios' - ? 'list.bullet' - : require('../../../assets/expo-logo.png') - } + icon={process.env.EXPO_OS === 'ios' ? 'list.bullet' : require('@/assets/expo-logo.png')} iconRenderingMode={process.env.EXPO_OS === 'ios' ? 'template' : 'original'}> Left Menu {/* Simple actions */} Alert.alert('Send', 'Email sent!')}> @@ -202,7 +198,7 @@ export default function HeaderItemsScreen() { {/* Nested menu */} - + Alert.alert('Notifications', 'Toggling notifications...')}> @@ -217,9 +213,7 @@ export default function HeaderItemsScreen() {