Files
noahspan-flying/tests/e2e/steps/pilots.steps.ts
noahspannbauer 071e211525 Feature/4 pilots add (#20)
* changing api url to env variable

* updating env variables

* updating env variables

* updating env variables

* updating env variables

* updating env variables

* updating env variables

* feature/4-pilots---add

* feature/4-pilots---add

* feature/4-pilots---add

* feature/4-pilots---add

* ad pilot

* add pilot

* add pilot

* add pilot

* add pilot

* add pilot

* adding pilots

* add pilot

* add pilot

* add pilots

* add pilot

* add pilot

* adding pilots

* adding pilots

* adding pilots

* adding pilots

* adding pilots

* adding pilots

* adding pilots

* adding pilots

* adding pilots

* adding pilots

* adding pilots

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* Testing menu button

* Testing menu button

* Testing menu button

* Testing menu button

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

* adding pilot

---------

Co-authored-by: Noah Spannbauer <nspannbauer@sensonix.com>
2024-09-23 20:52:59 -05:00

52 lines
1.3 KiB
TypeScript

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 Add Pilot button',
async function (this: ICustomWorld) {
const pilotsPage = new PilotsPage(this.page!);
await pilotsPage.clickAddPilotButton();
}
);
When(
`the user enters the pilot's information`,
async function (this: ICustomWorld) {
const pilotsPage = new PilotsPage(this.page!);
}
);
// When(`the user clicks the Save button`, async function (this: ICustomWorld) {
// const pilotsPage = new PilotsPage(this.page!);
// await pil
// })
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();
}
);