Skip to content

Commit

Permalink
Fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
yunusefendi52 committed Dec 3, 2024
1 parent 1266edc commit c7490e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pages/signin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<form class="w-full flex flex-col gap-3" v-if="LOCAL_AUTH_ENABLED" @submit.prevent="(e) => signInAuth(e)">
<InputText required name="username" placeholder="Username" fluid />
<InputText required name="password" placeholder="Password" type="password" fluid />
<Button type="submit" label="Sign In" :loading="isPending" />
<Button type="submit" data-testid="sign_in_btn" label="Sign In" :loading="isPending" />
</form>
<AppDivider :orientation="'horizontal'" v-if="LOCAL_AUTH_ENABLED" />
<div class="w-full flex justify-center" style="color-scheme: auto;">
Expand Down
4 changes: 2 additions & 2 deletions tests-e2e/setup/auth.setup.mts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ setup('Authenticate', async ({ page }) => {
await page.goto('http://localhost:3000/signin')
await page.locator('[name="username"]').fill('usertest1')
await page.locator('[name="password"]').fill('a5756f781e0e433986364b82de545c3b')
await page.getByLabel('Sign In').click()
await expect(page.getByLabel('Sign In')).toHaveCount(0)
await page.getByTestId('sign_in_btn').click()
await expect(page.getByTestId('sign_in_btn')).toHaveCount(0)

await page.context().storageState({ path: authFile })
})

0 comments on commit c7490e3

Please sign in to comment.