Skip to content
Open
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
9 changes: 9 additions & 0 deletions .maestro/_subflows/complete-app-onboarding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
appId: com.bearstudio.startuinative
tags:
- subflow
---
# Skip the 2-screen app onboarding
- tapOn:
id: 'app-onboarding-continue'
- tapOn:
id: 'app-onboarding-continue'
27 changes: 27 additions & 0 deletions .maestro/_subflows/login.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
appId: com.bearstudio.startuinative
tags:
- subflow
env:
TEST_EMAIL: 'admin@admin.com'
TEST_OTP: '000000'
---
- openLink: exp://10.0.1.159:8081

# Complete app onboarding (2 screens)
#- runFlow: ./complete-app-onboarding.yaml

# Sign in with test email
- tapOn:
label: "sign-in-email"
- inputText: ${TEST_EMAIL}
- tapOn:
id: 'sign-in-submit'

# Enter OTP (auto-submits after 6 digits)
- tapOn:
label: "otp-input"
index: 0
- inputText: ${TEST_OTP}

# Wait for home screen to load
- waitForAnimationToEnd
9 changes: 9 additions & 0 deletions .maestro/auth/login.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
appId: com.bearstudio.startuinative
tags:
- auth
- smokeTest
---
- runFlow: ../_subflows/login.yaml

# Assert we reached the home screen
- assertVisible: 'Home'
20 changes: 20 additions & 0 deletions .maestro/auth/logout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
appId: com.bearstudio.startuinative
tags:
- auth
---
- runFlow: ../_subflows/login.yaml

# Navigate to account tab
- tapOn: 'Account'

# Tap sign out
- tapOn:
id: 'account-sign-out'

# Confirm sign out
- tapOn:
id: 'confirm-sign-out'

# Assert we're back on sign-in screen
- assertVisible:
id: 'sign-in-email'
14 changes: 14 additions & 0 deletions .maestro/books/browse-books.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
appId: com.bearstudio.startuinative
tags:
- books
---
- runFlow: ../_subflows/login.yaml

# Navigate to Books tab
- tapOn: 'Books'
- waitForAnimationToEnd

# Assert books list is visible (wait for API data)
- extendedWaitUntil:
visible: 'Books'
timeout: 10000
15 changes: 15 additions & 0 deletions .maestro/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
flows:
- '**/*.yaml'
excludeTags:
- subflow
env:
APP_ID: com.bearstudio.startuinative
TEST_EMAIL: admin@admin.com
TEST_OTP: '000000'
TEST_USER_NAME: Admin

---
- stopApp:
appId: com.bearstudio.startuinative
label: Reset ExampleApp
- openLink: exp://10.0.1.159:8081
23 changes: 23 additions & 0 deletions .maestro/navigation/tab-navigation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
appId: com.bearstudio.startuinative
tags:
- navigation
- smokeTest
---
- runFlow: ../_subflows/login.yaml

# Verify Home tab is visible
- assertVisible: 'Home'

# Navigate to Books tab
- tapOn: 'Books'
- waitForAnimationToEnd

# Navigate to Account tab
- tapOn: 'Account'
- waitForAnimationToEnd
- assertVisible:
id: 'account-sign-out'

# Navigate back to Home tab
- tapOn: 'Home'
- waitForAnimationToEnd
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"gen:api": "dotenv -- npx @hey-api/openapi-ts -f ./src/lib/hey-api/config.ts",
"gen:icons": "svgr --config-file src/components/icons/svgr.config.cjs src/components/icons/svg-sources && prettier -w src/components/icons/generated",
"android": "expo run:android",
"ios": "expo run:ios"
"ios": "expo run:ios",
"test:e2e": "maestro test .maestro/",
"test:e2e:smoke": "maestro test .maestro/ --include-tags smokeTest"
},
"dependencies": {
"@bearstudio/ui-state": "1.0.2",
Expand Down
7 changes: 6 additions & 1 deletion src/features/account/view-account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ export const ViewAccount = () => {
/>
<CardTitle>{data.user.name}</CardTitle>
</HStack>
<Button variant="@ghost" onPress={() => signoutSheet.onOpen()}>
<Button
testID="account-sign-out"
variant="@ghost"
onPress={() => signoutSheet.onOpen()}
>
<IconLogOut width={14} height={14} />
{t('account:user.signOut')}
</Button>
Expand All @@ -108,6 +112,7 @@ export const ViewAccount = () => {
{t('auth:signOut.confirm.cancel')}
</Button>
<Button
testID="confirm-sign-out"
onPress={() => {
queryClient.clear();
authClient.signOut();
Expand Down
1 change: 1 addition & 0 deletions src/features/app-onboarding/view-app-onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export const ViewOnboarding = () => {
))}
</HStack>
<Button
testID="app-onboarding-continue"
full
bg="white"
color="neutral.900"
Expand Down
5 changes: 4 additions & 1 deletion src/features/auth/view-auth-onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const ViewAuthOnboarding = () => {
{t('auth:onboarding.name.label')}
</field.Label>
<field.FieldText
testID="onboarding-name"
autoFocus
returnKeyType="done"
onSubmitEditing={form.handleSubmit}
Expand All @@ -54,7 +55,9 @@ export const ViewAuthOnboarding = () => {
)}
</form.AppField>
</Stack>
<form.Submit>{t('auth:onboarding.continue')}</form.Submit>
<form.Submit testID="onboarding-submit">
{t('auth:onboarding.continue')}
</form.Submit>
</Stack>
</form.AppForm>
</Stack>
Expand Down
4 changes: 3 additions & 1 deletion src/features/auth/view-otp-verification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ export const ViewOtpVerification = () => {
)}
</form.AppField>
</Stack>
<form.Submit>{t('auth:verification.confirm')}</form.Submit>
<form.Submit testID="otp-submit">
{t('auth:verification.confirm')}
</form.Submit>
</Stack>
<LoginOtpHint />
</Stack>
Expand Down
5 changes: 4 additions & 1 deletion src/features/auth/view-sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const ViewSignIn = () => {
{(field) => (
<field.Field>
<field.FieldText
accessibilityLabel="sign-in-email"
placeholder={t('auth:signin.email.placeholder')}
autoCapitalize="none"
placeholderTextColor="neutral.600"
Expand All @@ -93,7 +94,9 @@ export const ViewSignIn = () => {
</field.Field>
)}
</form.AppField>
<form.Submit full>{t('auth:signin.loginWithEmail')}</form.Submit>
<form.Submit full testID="sign-in-submit">
{t('auth:signin.loginWithEmail')}
</form.Submit>
</Stack>
{/* For social sign in integration */}
{/* <HStack alignItems="center" spacing={16}>
Expand Down
Loading