Skip to content

Commit 73515b1

Browse files
author
Kevin-Li-2025
committed
Stabilize frontend E2E auth tab selector
1 parent df50193 commit 73515b1

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

AccessCity.App/app/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,14 @@ export default function AuthScreen() {
182182
<>
183183
<View style={styles.tabContainer}>
184184
<Pressable
185+
testID="index-auth-login-tab"
185186
style={[styles.tab, !isSignup && styles.tabActive]}
186187
onPress={() => setIsSignup(false)}
187188
>
188189
<Text style={[styles.tabText, !isSignup && styles.tabTextActive]}>Log In</Text>
189190
</Pressable>
190191
<Pressable
192+
testID="index-auth-signup-tab"
191193
style={[styles.tab, isSignup && styles.tabActive]}
192194
onPress={() => setIsSignup(true)}
193195
>

AccessCity.App/e2e/app.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ test.describe('AccessCity web (Expo)', () => {
144144

145145
test('can switch to Sign Up tab and see full name field', async ({ page }) => {
146146
await page.goto('/');
147-
await page.getByText('Sign Up', { exact: true }).click();
147+
await page.getByTestId('index-auth-signup-tab').click();
148148
await expect(page.getByPlaceholder('Full Name')).toBeVisible({ timeout: 15_000 });
149149
});
150150

0 commit comments

Comments
 (0)