MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / setBackgroundScriptEnabled

Function setBackgroundScriptEnabled

e2e/background-script.spec.ts:88–95  ·  view source on GitHub ↗
(page: Page, enabled: boolean)

Source from the content-addressed store, hash-verified

86}
87
88async function setBackgroundScriptEnabled(page: Page, enabled: boolean): Promise<void> {
89 const scriptSwitch = page.locator(".arco-switch").first();
90 await expect(scriptSwitch).toBeVisible({ timeout: 10_000 });
91 if ((await scriptSwitch.getAttribute("aria-checked")) === String(enabled)) return;
92
93 await scriptSwitch.click();
94 await expect(scriptSwitch).toHaveAttribute("aria-checked", String(enabled), { timeout: 10_000 });
95}
96
97async function readBackgroundDiagnostics(page: Page): Promise<any> {
98 return page.evaluate(() => {

Callers 1

Calls 1

clickMethod · 0.65

Tested by

no test coverage detected