Migrate knock/* from Cypress to Playwright (#12030)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
a806d71d45
commit
e92ca4fcd2
11 changed files with 721 additions and 601 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue