* Helper: create a script via the editor, then open the options page.
(context: BrowserContext, extensionId: string)
| 6 | * Helper: create a script via the editor, then open the options page. |
| 7 | */ |
| 8 | async function createScriptAndGoToList(context: BrowserContext, extensionId: string): Promise<Page> { |
| 9 | const editorPage = await openEditorPage(context, extensionId); |
| 10 | |
| 11 | // Wait for Monaco editor |
| 12 | await expect(editorPage.locator(".monaco-editor")).toBeVisible({ timeout: 10_000 }); |
| 13 | await expect(editorPage.locator(".view-lines")).toContainText("==UserScript==", { |
| 14 | timeout: 10_000, |
| 15 | }); |
| 16 | |
| 17 | await saveCurrentEditor(context, extensionId, editorPage); |
| 18 | |
| 19 | // Open the options page (script list) |
| 20 | const page = await openOptionsPage(context, extensionId); |
| 21 | |
| 22 | return page; |
| 23 | } |
| 24 | |
| 25 | test.describe("Script Management", () => { |
| 26 | test("should create a script and see it in the list", async ({ context, extensionId }) => { |
no test coverage detected