mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
750 B
34 lines
750 B
2 years ago
|
// playwright-dev-page.ts
|
||
|
import { expect, Page } from "@playwright/test";
|
||
|
import BasePage from "../Base";
|
||
|
|
||
|
export class LoginPage extends BasePage {
|
||
|
|
||
|
constructor(rootPage: Page) {
|
||
|
super(rootPage);
|
||
|
}
|
||
|
|
||
|
goto() {
|
||
|
return this.rootPage.goto('/#/signin');
|
||
|
}
|
||
|
|
||
|
get() {
|
||
|
return this.rootPage.locator("html");
|
||
|
}
|
||
|
|
||
|
async fillEmail(email: string) {
|
||
|
await this.get().locator(`[pw-data="nc-form-signin__email"]`).fill(email);
|
||
|
}
|
||
|
|
||
|
async fillPassword(password: string) {
|
||
|
await this.get().locator(`[pw-data="nc-form-signin__password"]`).fill(password);
|
||
|
}
|
||
|
|
||
|
async submit() {
|
||
|
await this.get().locator(`[pw-data="nc-form-signin__submit"]`).click();
|
||
|
|
||
|
await expect(this.rootPage).toHaveURL('http://localhost:3000/#/');
|
||
|
}
|
||
|
|
||
|
}
|