mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
* fix(mobile): infoSheet loses content * test(mobile): refactor e2e tests Reorganise the e2e test and make them easier to maintain. The previous structure was monotlithic. One would start the history tests and would have to wait for all of them to complete. Now one can test individual features - like twap, swap, stake txs without having the run the whole flow. Each of those can be run on it’s own. They can also be run as a whole in the __suite__ - every suite is optimised to start the app once and then to run flow without uninstalling and instalilng the app again. * test(mobile): run tests on android as well * test(mobile): fix wrong mock data * fix(mobile): linting * test(mobile): make assertions android compatible * fix(mobile): prettier * test(mobile): add stake claim test * test(mobile): speed up app launch in dev mode * test(mobile): test improvements * test(mobile): unstable hooks caused app to crash There was somethign wrong with AssetsNavbar and the way that react-navigation renders it. In tests we got crashes due to different number of hooks being rendered * test(mobile): fix prettier
177 lines
4.2 KiB
YAML
177 lines
4.2 KiB
YAML
appId: ${APP_ID}
|
|
tags:
|
|
- settings
|
|
- smoke
|
|
---
|
|
# Theme Selection E2E Test
|
|
# Tests switching between light, dark, and auto (system) theme modes and verifying UI updates correctly
|
|
|
|
- runFlow:
|
|
file: ../../utils/setup/app-start.yml
|
|
|
|
# ============================================
|
|
# Use e2eOnboardedAccount shortcut
|
|
# ============================================
|
|
|
|
- tapOn:
|
|
id: 'e2eOnboardedAccount'
|
|
|
|
# Wait for home screen to load
|
|
- assertVisible:
|
|
id: 'home-tab'
|
|
|
|
# ============================================
|
|
# Note Initial Theme - Home Tab
|
|
# ============================================
|
|
|
|
# Note: Initial theme state will vary based on device/system settings
|
|
# We verify theme by checking UI elements change when theme is switched
|
|
# Background colors and text colors will be verified implicitly through theme changes
|
|
|
|
# ============================================
|
|
# Navigate to Settings tab
|
|
# ============================================
|
|
|
|
- tapOn:
|
|
id: 'account-tab'
|
|
|
|
# Wait for settings screen
|
|
- assertVisible:
|
|
text: '.*(Settings|Account).*'
|
|
|
|
# ============================================
|
|
# Navigate to App Settings
|
|
# ============================================
|
|
|
|
# Tap "App Settings" button (settings icon)
|
|
- tapOn:
|
|
id: 'settings-screen-header-app-settings-button'
|
|
|
|
# Verify navigation to app settings screen
|
|
- assertVisible:
|
|
text: 'Settings'
|
|
|
|
# Verify "Appearance" row is visible
|
|
- assertVisible:
|
|
text: 'Appearance'
|
|
|
|
# ============================================
|
|
# Navigate to Theme Settings
|
|
# ============================================
|
|
|
|
# Tap "Appearance" row (opens floating menu)
|
|
- tapOn:
|
|
text: '.*Auto.*'
|
|
|
|
# Wait for menu to appear (MenuView component)
|
|
# The menu should show theme options
|
|
|
|
# ============================================
|
|
# Theme Options Verification
|
|
# ============================================
|
|
|
|
# Verify "Light" option available
|
|
- assertVisible:
|
|
text: 'Light'
|
|
|
|
# Verify "Dark" option available
|
|
- assertVisible:
|
|
text: 'Dark'
|
|
|
|
# Verify "Auto" option available (Auto follows system theme)
|
|
- assertVisible:
|
|
text: 'Auto'
|
|
|
|
# Note: Current selection is shown in the menu (native menu indicates selected item)
|
|
|
|
# ============================================
|
|
# Change to Dark Theme
|
|
# ============================================
|
|
|
|
# Tap "Dark" option in the menu
|
|
- tapOn:
|
|
text: 'Dark'
|
|
|
|
# Wait for menu to close and theme to apply
|
|
- assertVisible:
|
|
text: 'Settings'
|
|
|
|
# Verify we're back on app settings screen
|
|
- assertVisible:
|
|
text: 'Appearance'
|
|
|
|
# Verify Appearance row now shows "Dark" as selected
|
|
- assertVisible:
|
|
id: 'settings-screen-header-more-settings-button'
|
|
text: '.*Dark.*'
|
|
|
|
# Verify dark theme is actually applied by checking theme testID
|
|
- assertVisible:
|
|
id: 'theme-dark'
|
|
|
|
# ============================================
|
|
# Change to Light Theme
|
|
# ============================================
|
|
|
|
# Tap "Appearance" row
|
|
- tapOn:
|
|
id: 'settings-screen-header-more-settings-button'
|
|
text: '.*Dark.*'
|
|
|
|
# Tap "Light" option
|
|
- tapOn:
|
|
text: 'Light'
|
|
|
|
# Wait for menu to close
|
|
- assertVisible:
|
|
text: 'Settings'
|
|
|
|
# Verify Appearance row shows "Light" as selected
|
|
- assertVisible:
|
|
id: 'settings-screen-header-more-settings-button'
|
|
text: '.*Light.*'
|
|
|
|
# Verify light theme is actually applied by checking theme testID
|
|
- assertVisible:
|
|
id: 'theme-light'
|
|
|
|
# ============================================
|
|
# Change to Auto (System) Theme
|
|
# ============================================
|
|
|
|
# Navigate to App Settings
|
|
- tapOn:
|
|
id: 'settings-screen-header-more-settings-button'
|
|
text: '.*Light.*'
|
|
|
|
# Tap "Auto" option
|
|
- tapOn:
|
|
text: 'Auto'
|
|
|
|
# Wait for menu to close
|
|
- assertVisible:
|
|
text: 'Settings'
|
|
|
|
# Verify Appearance row shows "Auto" as selected
|
|
- assertVisible:
|
|
id: 'settings-screen-header-more-settings-button'
|
|
text: '.*Auto.*'
|
|
|
|
# Verify auto theme is applied (will resolve to system theme: light or dark)
|
|
# Note: The testID will be theme-light or theme-dark depending on device system setting
|
|
# We verify that one of the theme testIDs exists
|
|
- runFlow:
|
|
when:
|
|
visible:
|
|
id: 'theme-light'
|
|
commands:
|
|
- assertVisible:
|
|
id: 'theme-light'
|
|
- runFlow:
|
|
when:
|
|
visible:
|
|
id: 'theme-dark'
|
|
commands:
|
|
- assertVisible:
|
|
id: 'theme-dark'
|