Skip to content

Commit 57e2249

Browse files
committed
update auth spec
1 parent 47b1855 commit 57e2249

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

testing/e2e/src/1.1-auth.spec.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
import { users } from './helpers/data';
12
import { expect, test } from './helpers/fixtures';
23

3-
// no need to test the actual login here as it is tested on every other page
4-
54
test.describe('redirects', () => {
65
test('should redirect to login page from the index page', async ({ page }) => {
76
await page.goto('/');
87
await expect(page).toHaveURL('/auth/login');
98
});
109
});
10+
11+
test.describe('login page', () => {
12+
test('should allow logging in', async ({ getPageModel, getProjectMetadata }) => {
13+
const loginPage = await getPageModel('/auth/login');
14+
const credentials = users[getProjectMetadata('browserTarget')];
15+
await loginPage.fillLoginForm(credentials);
16+
await loginPage.expect.toHaveURL('/dashboard');
17+
});
18+
});

0 commit comments

Comments
 (0)