Skip to content

Commit

Permalink
Add test to confirm registering with existing credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
paustint committed Nov 8, 2024
1 parent 4cde413 commit cf9e564
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions apps/jetstream-e2e/src/tests/authentication/login3.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,17 @@ test.describe('Login 3', () => {
await expect(response.status()).toBe(200);
});
});

test('Should not be able to register with an existing email address', async ({ page, authenticationPage, playwrightPage }) => {
const { email, password } = await test.step('Sign up, verify, logout', async () => {
const user = await authenticationPage.signUpAndVerifyEmail();
await playwrightPage.logout();
return user;
});

await test.step('Attempt to register with same email address', async () => {
await authenticationPage.fillOutSignUpForm(email, 'test person', password, password);
await expect(page.getByText('This email is already registered.')).toBeVisible();
});
});
});

0 comments on commit cf9e564

Please sign in to comment.