Skip to content

Commit 1df335d

Browse files
committed
add new pages to test
1 parent 87036e3 commit 1df335d

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { $LoginCredentials } from '@opendatacapture/schemas/auth';
2+
import type { Locator, Page } from '@playwright/test';
3+
4+
import { RootPage } from '../__root.page';
5+
6+
export class LoginPage extends RootPage {
7+
readonly loginForm: Locator;
8+
9+
constructor(page: Page) {
10+
super(page);
11+
this.loginForm = page.getByTestId('login-form');
12+
}
13+
14+
async fillLoginForm(credentials: $LoginCredentials) {
15+
await this.loginForm.getByLabel('username').fill(credentials.username);
16+
await this.loginForm.getByLabel('password').fill(credentials.password);
17+
await this.loginForm.getByLabel('Submit').click();
18+
}
19+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { Page } from '@playwright/test';
2+
3+
import { AppPage } from '../_app.page';
4+
5+
export class SubjectDataTablePage extends AppPage {
6+
constructor(page: Page) {
7+
super(page);
8+
}
9+
}

0 commit comments

Comments
 (0)