Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/maestro e2e #72

Merged
merged 27 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
82ad7c1
chore: update maestro tests
MateuszRostkowski Aug 13, 2024
3d522f8
Merge remote-tracking branch 'origin/main' into feat/maestro-e2e-testing
MateuszRostkowski Aug 13, 2024
b55e6de
refactor: add test IDs to sign-in screen components
MateuszRostkowski Aug 13, 2024
2949555
refactor: add test IDs to home screen components
MateuszRostkowski Aug 13, 2024
e235557
chore: add maestro e2e debug output to gitignore
MateuszRostkowski Aug 13, 2024
1dfe2b5
refactor: add test IDs to BottomBar component
MateuszRostkowski Aug 13, 2024
925ac4f
fix: properly set spacings in checkbox group component
MateuszRostkowski Aug 13, 2024
b5d68ae
fix: properly set spacings in radio group component
MateuszRostkowski Aug 13, 2024
c8a91d7
chore: update gitignore to exclude e2e-debug-output
MateuszRostkowski Aug 13, 2024
2c95bfd
chore: update maestro tests
MateuszRostkowski Aug 13, 2024
5cb3ecc
chore: run generate:query script
MateuszRostkowski Aug 13, 2024
fa30f7e
fix: properly start profile and settings tests
MateuszRostkowski Aug 13, 2024
1a2ec65
refactor: Add test IDs to Input and Select components
MateuszRostkowski Aug 13, 2024
07cee80
refactor: Simplify Text component by removing unnecessary code
MateuszRostkowski Aug 13, 2024
312dcf4
chore: Update default values in useSignInForm for production build
MateuszRostkowski Aug 13, 2024
8da3021
chore: Update packages and scripts
MateuszRostkowski Aug 13, 2024
ae95969
refactor: Add testID prop to TabBarItemWrapper component
MateuszRostkowski Aug 13, 2024
6bd05a4
chore: update maestro tests
MateuszRostkowski Aug 14, 2024
cd05902
fix: make mocking server work again
MateuszRostkowski Aug 14, 2024
1150e73
refactor: Add testID prop to usePasswordValidation component
MateuszRostkowski Aug 14, 2024
06e1c3b
chore: Update start:e2e script to include IS_MOCK flag
MateuszRostkowski Aug 14, 2024
002c0c1
chore: Add E2E testing documentation
MateuszRostkowski Aug 14, 2024
75c950a
chore: Enable mocked server and suppress console errors and warnings
MateuszRostkowski Aug 14, 2024
d011811
docs: update Mocking tutorial
MateuszRostkowski Aug 14, 2024
0d3f0dc
Merge branch 'feat/maestro-e2e-testing' into fix/maestro-e2e
MateuszRostkowski Aug 14, 2024
e8100e0
chore: Update Maestro E2E testing documentation and fix server startu…
MateuszRostkowski Aug 14, 2024
53ffba9
chore: Update Button component test snapshot
MateuszRostkowski Aug 16, 2024
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ env.json
# baca-cli build
scripts/cli/build/
scripts/cli/temp/

# maestro
e2e-debug-output
61 changes: 52 additions & 9 deletions .maestro/auth/login-with-validation.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,55 @@
appId: host.exp.Exponent
appId: ${APP_ID}
tags:
- auth
---
- launchApp
# Check if the login screen is visible
- assertVisible:
id: 'sign_in:title'
- assertVisible:
id: 'sign_in:sub_title'
- assertVisible:
id: 'sign_in:email_input:label'

# Check if empty email input is invalid
- tapOn:
text: 'BACA (qa)'
- assertVisible: 'Welcome back'
- assertVisible: 'Remember me'
id: 'sign_in:submit_button'
- assertVisible:
id: 'sign_in:email_input:error_message'
- assertVisible:
id: 'sign_in:password_input:error_message'

# Check if invalid email input and empty password is invalid
- tapOn:
text: 'Remember me'
- assertVisible: 'Log in'
- tapOn: 'Log in'
- assertVisible: 'Home'
id: 'sign_in:email_input:input'
- inputText: 'invalid-email'
- hideKeyboard
- tapOn:
id: 'sign_in:submit_button'
- assertVisible:
id: 'sign_in:email_input:error_message'
- assertVisible:
id: 'sign_in:password_input:error_message'

# Check if valid email input and empty password is invalid
- tapOn:
id: 'sign_in:email_input:input'
- eraseText
- inputText: 'email@test.com'
- hideKeyboard
- tapOn:
id: 'sign_in:submit_button'
- assertVisible:
id: 'sign_in:password_input:error_message'

# Check if valid email input and password is valid
- tapOn:
id: 'sign_in:password_input:input'
- eraseText
- inputText: 'password'
- hideKeyboard
- tapOn:
id: 'sign_in:submit_button'

# Check if login is successful
- assertVisible:
id: 'home_screen:title'
11 changes: 11 additions & 0 deletions .maestro/auth/logout-when-needed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
appId: ${APP_ID}
tags:
- auth
---
- stopApp
- openLink: exp://127.0.0.1:8081/--/sign-in
- runFlow:
when:
visible:
id: 'home_screen:title'
file: ../utils/logout.yaml
7 changes: 0 additions & 7 deletions .maestro/categories/categories.yaml

This file was deleted.

45 changes: 20 additions & 25 deletions .maestro/config.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
flows:
- auth/*
- home/*
- categories/*
- example/*
- settings/*
- profile/*
- 'auth/*'
- 'home/*'
- 'settings/*'
- 'profile/*'

excludeTags:
- utils
includeTags:
- 'auth'
- 'home'
- 'settings'
- 'profile'

executionOrder:
continueOnFailure: true
continueOnFailure: false
flowsOrder:
- login-with-validation
- details
- full-screen-form
- blog
- categories
- application-info
- colors
- components
- typography
- homestack
- data-backend
- test-form
- notifications-helpers
- user-session
- settings
- profile
- 'logout-when-needed'
- 'login-with-validation'
- 'details'
- 'full-screen-form'
- 'settings'
# https://github.com/mobile-dev-inc/maestro/issues/1484
# Wait for it to be resolved and then remove blog from the list
# blog is not implemented, it's just a placeholder, to make tests run
- 'blog'
- 'profile'
12 changes: 0 additions & 12 deletions .maestro/example/application-info.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .maestro/example/colors.yaml

This file was deleted.

62 changes: 0 additions & 62 deletions .maestro/example/components.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .maestro/example/data-backend.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions .maestro/example/homestack.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions .maestro/example/notifications-helpers.yaml

This file was deleted.

66 changes: 0 additions & 66 deletions .maestro/example/test-form.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions .maestro/example/typography.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions .maestro/example/user-session.yaml

This file was deleted.

Loading
Loading