Migrate knock/* from Cypress to Playwright (#12030)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2023-12-12 14:08:36 +00:00 committed by GitHub
parent a806d71d45
commit e92ca4fcd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 721 additions and 601 deletions

View file

@ -19,6 +19,7 @@ import { type Locator, type Page, expect } from "@playwright/test";
import { Settings } from "./settings";
import { Client } from "./client";
import { Labs } from "./labs";
import { Spotlight } from "./Spotlight";
export class ElementAppPage {
public constructor(public readonly page: Page) {}
@ -148,4 +149,10 @@ export class ElementAppPage {
public async getClipboardText(): Promise<string> {
return this.page.evaluate("navigator.clipboard.readText()");
}
public async openSpotlight(): Promise<Spotlight> {
const spotlight = new Spotlight(this.page);
await spotlight.open();
return spotlight;
}
}