-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlogin.page.ts
More file actions
33 lines (26 loc) · 872 Bytes
/
login.page.ts
File metadata and controls
33 lines (26 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { Label } from './../ui-elements/label';
import { Page } from 'playwright';
import { LoginFormWidget } from './widgets/login.form';
import { BasePage } from './../base/base.page';
export class LoginPage extends BasePage {
private readonly _loginTitle: Label;
private readonly _loginForm: LoginFormWidget;
constructor(page: Page) {
super(page, 'login');
this._loginTitle = new Label(this, '.subheader');
this._loginForm = new LoginFormWidget(this, {
username: '#username',
password: '#password',
submit: '[type="submit"]',
});
}
public get loginTitle(): Label {
return this._loginTitle;
}
public get loginForm(): LoginFormWidget {
return this._loginForm;
}
public async open(): Promise<void> {
await super.open(this.path);
}
}