Files
noahspan-flying/tests/e2e/pages/pilots.page.ts
noahspannbauer dd73d48ffd Feature/3 pilots page and drawer (#17)
* adding pilots page and drawer component

* adding pilot page and pilot drawer
2024-05-30 22:15:43 -05:00

27 lines
659 B
TypeScript

import { Locator, Page } from '@playwright/test';
import { config } from '../support/config';
export class PilotsPage {
page: Page;
newButton: Locator;
pilotDrawer: Locator;
pilotDrawerCancelButton: Locator;
constructor(page: Page) {
this.page = page;
this.newButton = page.getByTestId('new-pilot-button');
this.pilotDrawer = page.getByTestId('pilot-drawer');
this.pilotDrawerCancelButton = page.getByTestId(
'pilot-drawer-cancel-button'
);
}
public async clickNewButton() {
await this.newButton.click();
}
public async clickPilotDrawerCancelButton() {
await this.pilotDrawerCancelButton.click();
}
}