Feature/3 pilots page and drawer (#17)

* adding pilots page and drawer component

* adding pilot page and pilot drawer
This commit was merged in pull request #17.
This commit is contained in:
2024-05-30 22:15:43 -05:00
committed by GitHub
parent 6782c1906d
commit dd73d48ffd
21 changed files with 878 additions and 14 deletions

View File

@@ -0,0 +1,35 @@
import { ICustomWorld } from '../support/world';
import { Given, Then, When } from '@cucumber/cucumber';
import { config } from '../support/config';
import { expect } from '@playwright/test';
import { PilotsPage } from '../pages/pilots.page';
When('the user clicks the New button', async function (this: ICustomWorld) {
const pilotsPage = new PilotsPage(this.page!);
await pilotsPage.clickNewButton();
});
When(
'the user clicks the pilot drawer cancel button',
async function (this: ICustomWorld) {
const pilotsPage = new PilotsPage(this.page!);
await pilotsPage.clickPilotDrawerCancelButton();
}
);
Then('the pilot drawer is visible', async function (this: ICustomWorld) {
const pilotsPage = new PilotsPage(this.page!);
await expect(pilotsPage.pilotDrawer).toBeVisible();
});
Then(
'the pilot drawer is no longer visible',
async function (this: ICustomWorld) {
const pilotsPage = new PilotsPage(this.page!);
await expect(pilotsPage.pilotDrawer).not.toBeVisible();
}
);