setting up playwright
This commit is contained in:
33
tests/e2e/support/world.ts
Normal file
33
tests/e2e/support/world.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { setWorldConstructor, World, IWorldOptions } from '@cucumber/cucumber';
|
||||
import * as messages from '@cucumber/messages';
|
||||
import {
|
||||
BrowserContext,
|
||||
Page,
|
||||
PlaywrightTestOptions,
|
||||
APIRequestContext
|
||||
} from '@playwright/test';
|
||||
|
||||
export interface CucumberWorldConstructorParams {
|
||||
parameters: { [key: string]: string };
|
||||
}
|
||||
|
||||
export interface ICustomWorld extends World {
|
||||
debug: boolean;
|
||||
feature?: messages.Pickle;
|
||||
context?: BrowserContext;
|
||||
page?: Page;
|
||||
testName?: string;
|
||||
startTime?: Date;
|
||||
server?: APIRequestContext;
|
||||
playwrightOptions?: PlaywrightTestOptions;
|
||||
}
|
||||
|
||||
export class CustomWorld extends World implements ICustomWorld {
|
||||
constructor(options: IWorldOptions) {
|
||||
super(options);
|
||||
}
|
||||
|
||||
debug = false;
|
||||
}
|
||||
|
||||
setWorldConstructor(CustomWorld);
|
||||
Reference in New Issue
Block a user