File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments