{ "$schema": "https://metabuilder.dev/schemas/package-playwright.schema.json", "package": "pastebin", "version": "1.3.0", "description": "Pastebin E2E tests", "suite": "pastebin", "tests": [ { "name": "home page loads", "tags": [ "@smoke" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "selector": "header", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "selector": "footer", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "home page has logo", "tags": [ "@smoke" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "logo-text", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "logo-text", "assertion": { "matcher": "toContainText", "text": "CodeSnippet" } } ] }, { "name": "home page has page header section", "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "page-header", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "home page has backend indicator", "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "backend-indicator", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "home page has navigation sidebar", "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "navigation-toggle-btn" }, { "action": "expect", "testId": "navigation-sidebar", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings page loads", "tags": [ "@smoke" ], "steps": [ { "action": "navigate", "url": "settings" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "page-header", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "main-content", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings page has settings content", "steps": [ { "action": "navigate", "url": "settings" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "main-content", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "demo page loads", "steps": [ { "action": "navigate", "url": "demo" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "selector": "header", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "atoms page loads", "steps": [ { "action": "navigate", "url": "atoms" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "molecules page loads", "steps": [ { "action": "navigate", "url": "molecules" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "organisms page loads", "steps": [ { "action": "navigate", "url": "organisms" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "templates page loads", "steps": [ { "action": "navigate", "url": "templates" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "main-content", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "navigating back and forward works", "steps": [ { "action": "navigate", "url": "atoms" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "navigate", "url": "molecules" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "goBack" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "assertion": { "matcher": "toHaveURL", "url": "http://localhost/pastebin/atoms" } }, { "action": "goForward" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "assertion": { "matcher": "toHaveURL", "url": "http://localhost/pastebin/molecules" } } ] }, { "name": "snippet new page loads", "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "page title is set", "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "evaluate", "script": "document.title.length > 0 ? true : (function(){ throw new Error('Missing page title') })()" } ] }, { "name": "no hydration errors on home page", "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "evaluate", "script": "!document.body.innerHTML.includes('Hydration') && !document.body.innerHTML.includes('hydrat')" }, { "action": "expect", "selector": "header", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "page loads for each route", "tags": [ "@smoke", "@parameterized" ], "parameterize": { "data": [ { "url": "", "label": "home" }, { "url": "settings", "label": "settings" }, { "url": "snippet/new", "label": "new snippet" } ] }, "steps": [ { "action": "navigate", "url": "${url}" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet manager interactions", "tags": [ "@hooks" ], "beforeEach": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" } ], "afterEach": [ { "action": "evaluate", "script": "localStorage.clear()" } ], "steps": [ { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } }, { "action": "click", "selector": "[data-testid='snippet-create-menu-trigger']", "skipIf": { "selector": "[data-testid='snippet-create-menu-trigger']", "state": "hidden" } } ] }, { "name": "health endpoint returns 200", "tags": [ "@api" ], "steps": [ { "action": "apiRequest", "method": "GET", "url": "/api/health", "assertion": { "status": 200 } } ] }, { "name": "skip hidden element interaction", "tags": [ "@skipIf" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "selector": "[data-testid='nonexistent-overlay-btn']", "skipIf": { "selector": "[data-testid='nonexistent-overlay-btn']", "state": "hidden" } }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet manager renders on home page", "tags": [ "@smoke", "@snippets" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForSelector", "selector": "[data-testid='namespace-selector'],[data-testid='snippet-manager-loading']", "timeout": 15000 }, { "action": "expect", "testId": "namespace-selector", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "empty state shown when no snippets", "tags": [ "@snippets" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "empty-state", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='snippet-manager-redux'] [data-testid='empty-state']", "state": "hidden" } } ] }, { "name": "namespace selector is visible", "tags": [ "@snippets" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "namespace-selector", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "create new snippet via dialog", "tags": [ "@snippets", "@crud" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForSelector", "selector": "[data-testid='namespace-selector'],[data-testid='snippet-manager-loading'],[data-testid='empty-state-namespace-selector']", "timeout": 15000 }, { "action": "click", "selector": "[data-testid='empty-state-create-menu'],[data-testid='snippet-create-menu-trigger']", "skipIf": { "selector": "[data-testid='empty-state-create-menu'],[data-testid='snippet-create-menu-trigger']", "state": "hidden" } }, { "action": "waitForSelector", "selector": "[data-testid='create-blank-snippet-item']", "timeout": 5000, "skipIf": { "selector": "[data-testid='create-blank-snippet-item']", "state": "hidden" } }, { "action": "click", "testId": "create-blank-snippet-item", "skipIf": { "selector": "[data-testid='create-blank-snippet-item']", "state": "hidden" } }, { "action": "waitForSelector", "selector": "[data-testid='snippet-editor-page']", "timeout": 10000 }, { "action": "fill", "testId": "snippet-title-input", "value": "My Test Snippet" }, { "action": "expect", "testId": "snippet-title-input", "assertion": { "matcher": "toHaveValue", "value": "My Test Snippet" } } ] }, { "name": "snippet dialog has required fields", "tags": [ "@snippets", "@crud" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-editor-page", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet editor page has code editor", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "waitForSelector", "selector": "[data-testid='snippet-editor-page']", "timeout": 10000 }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "expect", "testId": "code-editor-container", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet editor has language selector", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-language-select", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet editor has title input", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-title-input", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet editor has save button", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "waitForSelector", "selector": "[data-testid='snippet-tab-1-btn']", "timeout": 10000 }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='editor-save-btn']", "timeout": 10000 }, { "action": "expect", "testId": "editor-save-btn", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet dialog can be cancelled", "tags": [ "@snippets", "@crud" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "empty-state-create-menu", "skipIf": { "selector": "[data-testid='empty-state-create-menu']", "state": "hidden" } }, { "action": "click", "testId": "create-blank-snippet-item", "skipIf": { "selector": "[data-testid='create-blank-snippet-item']", "state": "hidden" } }, { "action": "click", "testId": "snippet-dialog-cancel-btn", "skipIf": { "selector": "[data-testid='snippet-dialog-cancel-btn']", "state": "hidden" } }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet card actions menu is accessible", "tags": [ "@snippets", "@crud" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-card-actions-menu", "skipIf": { "selector": "[data-testid='snippet-card-actions-menu']", "state": "hidden" } }, { "action": "expect", "testId": "snippet-card-edit-btn", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='snippet-card-edit-btn']", "state": "hidden" } } ] }, { "name": "snippet editor page for each language", "tags": [ "@snippets", "@parameterized" ], "parameterize": { "data": [ { "url": "snippet/new", "label": "new snippet editor" }, { "url": "snippet/new?lang=python", "label": "python snippet" }, { "url": "snippet/new?lang=javascript", "label": "javascript snippet" } ] }, "steps": [ { "action": "navigate", "url": "${url}" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-editor-page", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet form fields are all present", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-form-fields", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "snippet-title-input", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "snippet-language-select", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "snippet-description-textarea", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet title input accepts text", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "fill", "testId": "snippet-title-input", "value": "Hello World" }, { "action": "expect", "testId": "snippet-title-input", "assertion": { "matcher": "toHaveValue", "value": "Hello World" } } ] }, { "name": "snippet description accepts text", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "fill", "testId": "snippet-description-textarea", "value": "A test snippet description" }, { "action": "expect", "testId": "snippet-description-textarea", "assertion": { "matcher": "toHaveValue", "value": "A test snippet description" } } ] }, { "name": "snippet code editor section is present on code tab", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "expect", "testId": "code-editor-container", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "enable preview checkbox is present on code tab", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "expect", "testId": "enable-preview-checkbox", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "split screen editor container renders after enabling preview", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "check", "testId": "enable-preview-checkbox" }, { "action": "expect", "testId": "split-screen-editor-container", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "split screen view mode buttons appear after enabling preview", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "check", "testId": "enable-preview-checkbox" }, { "action": "expect", "testId": "view-mode-code-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "view-mode-split-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "view-mode-preview-btn", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet editor switches to split view after enabling preview", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "check", "testId": "enable-preview-checkbox" }, { "action": "click", "testId": "view-mode-split-btn" }, { "action": "expect", "testId": "split-screen-code-pane", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "split-screen-preview-pane", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet editor switches to code-only view after enabling preview", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "check", "testId": "enable-preview-checkbox" }, { "action": "click", "testId": "view-mode-code-btn" }, { "action": "expect", "testId": "split-screen-editor", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet editor preview mode toggle after enabling preview", "tags": [ "@snippets", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "check", "testId": "enable-preview-checkbox" }, { "action": "waitForSelector", "selector": "[data-testid='split-screen-editor']", "timeout": 5000 }, { "action": "click", "testId": "view-mode-preview-btn" }, { "action": "expect", "testId": "split-screen-editor", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "input parameters card is present on preview config tab", "tags": [ "@snippets", "@editor", "@params" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "check", "testId": "enable-preview-checkbox" }, { "action": "click", "testId": "snippet-tab-2-btn" }, { "action": "expect", "testId": "input-parameters-card", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "add parameter button is visible on preview config tab", "tags": [ "@snippets", "@editor", "@params" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "check", "testId": "enable-preview-checkbox" }, { "action": "click", "testId": "snippet-tab-2-btn" }, { "action": "expect", "testId": "add-parameter-btn", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "add parameter creates a new parameter item", "tags": [ "@snippets", "@editor", "@params" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "check", "testId": "enable-preview-checkbox" }, { "action": "click", "testId": "snippet-tab-2-btn" }, { "action": "click", "testId": "add-parameter-btn" }, { "action": "expect", "selector": "[data-testid='param-item-0']", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "function name input is present on preview config tab", "tags": [ "@snippets", "@editor", "@params" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "check", "testId": "enable-preview-checkbox" }, { "action": "click", "testId": "snippet-tab-2-btn" }, { "action": "expect", "testId": "function-name-input", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet view page renders", "tags": [ "@snippets", "@viewer" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-editor-page", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "namespace create dialog trigger is visible", "tags": [ "@snippets", "@namespace" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "create-namespace-trigger", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "create namespace dialog opens", "tags": [ "@snippets", "@namespace" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "create-namespace-trigger" }, { "action": "expect", "testId": "create-namespace-dialog", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "namespace-name-input", "assertion": { "matcher": "toBeVisible" } }, { "action": "click", "testId": "create-namespace-cancel-btn" } ] }, { "name": "namespace name input accepts text", "tags": [ "@snippets", "@namespace" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "create-namespace-trigger" }, { "action": "expect", "testId": "namespace-name-input", "assertion": { "matcher": "toBeVisible" } }, { "action": "fill", "testId": "namespace-name-input", "value": "My Namespace" }, { "action": "expect", "testId": "namespace-name-input", "assertion": { "matcher": "toHaveValue", "value": "My Namespace" } }, { "action": "click", "testId": "create-namespace-cancel-btn" } ] }, { "name": "snippet card copy button is visible when snippets exist", "tags": [ "@snippets", "@card" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-card-copy-btn", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='snippet-card-copy-btn']", "state": "hidden" } } ] }, { "name": "snippet card view button is visible when snippets exist", "tags": [ "@snippets", "@card" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-card-view-btn", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='snippet-card-view-btn']", "state": "hidden" } } ] }, { "name": "snippet card delete confirm dialog appears", "tags": [ "@snippets", "@crud" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-card-actions-menu", "skipIf": { "selector": "[data-testid='snippet-card-actions-menu']", "state": "hidden" } }, { "action": "click", "testId": "snippet-card-delete-btn", "skipIf": { "selector": "[data-testid='snippet-card-delete-btn']", "state": "hidden" } }, { "action": "expect", "testId": "confirm-delete-snippet-btn", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='confirm-delete-snippet-btn']", "state": "hidden" } } ] }, { "name": "python terminal renders on editor page", "tags": [ "@snippets", "@python", "@terminal" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "python-terminal", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='python-terminal']", "state": "hidden" } } ] }, { "name": "terminal header is visible", "tags": [ "@snippets", "@terminal" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "terminal-header", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='terminal-header']", "state": "hidden" } } ] }, { "name": "terminal output area renders", "tags": [ "@snippets", "@terminal" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "terminal-output-area", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='terminal-output-area']", "state": "hidden" } } ] }, { "name": "terminal input form is present", "tags": [ "@snippets", "@terminal" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "terminal-input-form", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='terminal-input-form']", "state": "hidden" } } ] }, { "name": "run python code button is visible", "tags": [ "@snippets", "@python", "@terminal" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "run-python-btn", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='run-python-btn']", "state": "hidden" } } ] }, { "name": "snippet language select has all supported languages", "tags": [ "@snippets", "@editor", "@languages" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-language-select", "assertion": { "matcher": "toBeVisible" } }, { "action": "click", "testId": "snippet-language-select" }, { "action": "expect", "selector": "[role='listbox']", "assertion": { "matcher": "toBeVisible" } }, { "action": "keyboard", "keys": "Escape" } ] }, { "name": "snippet editor loads for each runnable language", "tags": [ "@snippets", "@languages", "@parameterized" ], "parameterize": { "data": [ { "lang": "JavaScript", "label": "JavaScript" }, { "lang": "TypeScript", "label": "TypeScript" }, { "lang": "Python", "label": "Python" }, { "lang": "Go", "label": "Go" }, { "lang": "Rust", "label": "Rust" }, { "lang": "Java", "label": "Java" }, { "lang": "C%2B%2B", "label": "C++" }, { "lang": "Ruby", "label": "Ruby" }, { "lang": "PHP", "label": "PHP" }, { "lang": "Swift", "label": "Swift" }, { "lang": "Kotlin", "label": "Kotlin" }, { "lang": "Bash", "label": "Bash" } ] }, "steps": [ { "action": "navigate", "url": "snippet/new?lang=${lang}" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-editor-page", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet editor loads for each display-only language", "tags": [ "@snippets", "@languages", "@parameterized" ], "parameterize": { "data": [ { "lang": "JSX", "label": "JSX" }, { "lang": "TSX", "label": "TSX" }, { "lang": "HTML", "label": "HTML" }, { "lang": "CSS", "label": "CSS" }, { "lang": "SQL", "label": "SQL" }, { "lang": "Scala", "label": "Scala" }, { "lang": "Haskell", "label": "Haskell" }, { "lang": "R", "label": "R" }, { "lang": "Julia", "label": "Julia" }, { "lang": "Elixir", "label": "Elixir" }, { "lang": "Dart", "label": "Dart" }, { "lang": "Lua", "label": "Lua" }, { "lang": "Perl", "label": "Perl" }, { "lang": "C%23", "label": "C#" }, { "lang": "Other", "label": "Other" } ] }, "steps": [ { "action": "navigate", "url": "snippet/new?lang=${lang}" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-editor-page", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet dialog save button is present", "tags": [ "@snippets", "@crud" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "empty-state-create-menu", "skipIf": { "selector": "[data-testid='empty-state-create-menu']", "state": "hidden" } }, { "action": "click", "testId": "create-blank-snippet-item", "skipIf": { "selector": "[data-testid='create-blank-snippet-item']", "state": "hidden" } }, { "action": "expect", "testId": "snippet-dialog-save-btn", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='snippet-dialog-save-btn']", "state": "hidden" } }, { "action": "click", "testId": "snippet-dialog-cancel-btn", "skipIf": { "selector": "[data-testid='snippet-dialog-cancel-btn']", "state": "hidden" } } ] }, { "name": "snippet manager shows loading state then resolves", "tags": [ "@snippets", "@smoke" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForSelector", "selector": "[data-testid='namespace-selector'],[data-testid='snippet-manager-loading']", "timeout": 15000 }, { "action": "expect", "testId": "namespace-selector", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet code preview renders in card", "tags": [ "@snippets", "@card" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-code-preview", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='snippet-code-preview']", "state": "hidden" } } ] }, { "name": "snippet move to namespace submenu exists in card actions", "tags": [ "@snippets", "@card", "@namespace" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-card-actions-menu", "skipIf": { "selector": "[data-testid='snippet-card-actions-menu']", "state": "hidden" } }, { "action": "expect", "testId": "snippet-card-move-submenu", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='snippet-card-move-submenu']", "state": "hidden" } } ] }, { "name": "react preview container renders for JSX/TSX", "tags": [ "@snippets", "@preview" ], "steps": [ { "action": "navigate", "url": "snippet/new?lang=JSX" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-editor-page", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "preview unsupported renders for non-react language with preview enabled", "tags": [ "@snippets", "@preview" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-0-btn" }, { "action": "click", "testId": "snippet-language-select" }, { "action": "click", "testId": "language-option-Python" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "expect", "testId": "enable-preview-checkbox", "assertion": { "matcher": "toBeHidden" }, "skipIf": { "selector": "[data-testid='enable-preview-checkbox']", "state": "hidden" } }, { "action": "expect", "testId": "code-editor-container", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "no-snippet results message when search yields nothing", "tags": [ "@snippets", "@search" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "no-results-message", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='no-results-message']", "state": "hidden" } } ] }, { "name": "empty state message renders with create option", "tags": [ "@snippets", "@smoke" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "empty-state-message", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='empty-state-message']", "state": "hidden" } } ] }, { "name": "settings page loads with correct heading", "tags": [ "@smoke", "@settings" ], "steps": [ { "action": "navigate", "url": "settings" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings page has four tabs", "tags": [ "@settings", "@config" ], "steps": [ { "action": "navigate", "url": "settings" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "selector": "[role='tablist'][aria-label='Settings sections']", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "selector": "[role='tab']", "assertion": { "matcher": "toHaveCount", "count": 4 } } ] }, { "name": "settings tabs switch via URL param", "tags": [ "@settings", "@config", "@parameterized" ], "parameterize": { "data": [ { "tab": "profile", "label": "profile tab" }, { "tab": "ai", "label": "ai tab" }, { "tab": "storage", "label": "storage tab" }, { "tab": "database", "label": "database tab" } ] }, "steps": [ { "action": "navigate", "url": "settings?tab=${tab}" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings storage tab has backend card", "tags": [ "@settings", "@storage" ], "steps": [ { "action": "navigate", "url": "settings?tab=storage" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "storage-backend-card", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings storage tab has indexeddb option", "tags": [ "@settings", "@storage", "@config" ], "steps": [ { "action": "navigate", "url": "settings?tab=storage" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "storage-option-indexeddb", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings storage tab has dbal storage option", "tags": [ "@settings", "@storage", "@config" ], "steps": [ { "action": "navigate", "url": "settings?tab=storage" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "storage-option-dbal", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings storage tab has backend URL input", "tags": [ "@settings", "@storage" ], "steps": [ { "action": "navigate", "url": "settings?tab=storage" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "backend-url", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings storage tab has test connection button", "tags": [ "@settings", "@storage" ], "steps": [ { "action": "navigate", "url": "settings?tab=storage" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "test-connection-btn", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='test-connection-btn']", "state": "hidden" } } ] }, { "name": "settings storage tab has save settings button", "tags": [ "@settings", "@storage" ], "steps": [ { "action": "navigate", "url": "settings?tab=storage" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "save-storage-settings-btn", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings storage tab has storage info card", "tags": [ "@settings", "@storage" ], "steps": [ { "action": "navigate", "url": "settings?tab=storage" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "storage-info-card", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings storage tab has storage type description", "tags": [ "@settings", "@storage", "@config" ], "steps": [ { "action": "navigate", "url": "settings?tab=storage" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "storage-type-description", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings database tab has stats card", "tags": [ "@settings", "@database" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "database-stats-card", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings database stats shows snippet count", "tags": [ "@settings", "@database", "@config" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "stat-snippets", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='stat-snippets']", "state": "hidden" } } ] }, { "name": "settings database stats shows storage type", "tags": [ "@settings", "@database", "@config" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "stat-storage-type", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='stat-storage-type']", "state": "hidden" } } ] }, { "name": "settings database stats shows database size", "tags": [ "@settings", "@database", "@config" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "stat-database-size", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='stat-database-size']", "state": "hidden" } } ] }, { "name": "settings database tab has actions card", "tags": [ "@settings", "@database" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "database-actions-card", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings database actions has all four action buttons", "tags": [ "@settings", "@database", "@config" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "export-db-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "import-db-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "seed-db-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "clear-db-btn", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings database export section is present", "tags": [ "@settings", "@database" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "export-section", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings database import section is present", "tags": [ "@settings", "@database" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "import-section", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings database seed section is present", "tags": [ "@settings", "@database" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "seed-section", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings database clear section is present", "tags": [ "@settings", "@database" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "clear-section", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings database schema health card renders", "tags": [ "@settings", "@database" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "schema-healthy-card", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='schema-healthy-card']", "state": "hidden" } } ] }, { "name": "settings database recheck schema button is present", "tags": [ "@settings", "@database" ], "steps": [ { "action": "navigate", "url": "settings?tab=database" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "recheck-schema-btn", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='recheck-schema-btn']", "state": "hidden" } } ] }, { "name": "settings AI tab has openai settings card", "tags": [ "@settings", "@ai" ], "steps": [ { "action": "navigate", "url": "settings?tab=ai" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "openai-settings-card", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings AI tab has platform select", "tags": [ "@settings", "@ai", "@config" ], "steps": [ { "action": "navigate", "url": "settings?tab=ai" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "ai-platform-select", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings AI tab has API key input", "tags": [ "@settings", "@ai" ], "steps": [ { "action": "navigate", "url": "settings?tab=ai" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "openai-api-key-input", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings AI tab API key input accepts text", "tags": [ "@settings", "@ai" ], "steps": [ { "action": "navigate", "url": "settings?tab=ai" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "fill", "testId": "openai-api-key-input", "value": "sk-test-key-12345" }, { "action": "expect", "testId": "openai-api-key-input", "assertion": { "matcher": "toHaveValue", "value": "sk-test-key-12345" } } ] }, { "name": "settings AI tab has visibility toggle for API key", "tags": [ "@settings", "@ai" ], "steps": [ { "action": "navigate", "url": "settings?tab=ai" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "toggle-api-key-visibility", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "settings AI tab has save and clear buttons", "tags": [ "@settings", "@ai" ], "steps": [ { "action": "navigate", "url": "settings?tab=ai" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "save-api-key-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "clear-api-key-btn", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='clear-api-key-btn']", "state": "hidden" } } ] }, { "name": "settings AI tab has API key configured status", "tags": [ "@settings", "@ai", "@config" ], "steps": [ { "action": "navigate", "url": "settings?tab=ai" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "api-key-configured-status", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='api-key-configured-status']", "state": "hidden" } } ] }, { "name": "login page loads", "tags": [ "@smoke", "@auth" ], "beforeEach": [ { "action": "hook", "name": "clearAuth" } ], "steps": [ { "action": "navigate", "url": "login" }, { "action": "waitForSelector", "selector": "input#username", "timeout": 15000 }, { "action": "expect", "selector": "input#username", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "login page has username and password fields", "tags": [ "@auth" ], "beforeEach": [ { "action": "hook", "name": "clearAuth" } ], "steps": [ { "action": "navigate", "url": "login" }, { "action": "waitForSelector", "selector": "input#username", "timeout": 15000 }, { "action": "expect", "selector": "input#username", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "selector": "input#password", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "login page password field has visibility toggle", "tags": [ "@auth" ], "beforeEach": [ { "action": "hook", "name": "clearAuth" } ], "steps": [ { "action": "navigate", "url": "login" }, { "action": "waitForSelector", "selector": "input#username", "timeout": 15000 }, { "action": "expect", "selector": "[aria-label='Toggle password']", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "login page can switch to register form", "tags": [ "@auth" ], "beforeEach": [ { "action": "hook", "name": "clearAuth" } ], "steps": [ { "action": "navigate", "url": "login" }, { "action": "waitForSelector", "selector": "input#username", "timeout": 15000 }, { "action": "click", "text": "Create one." }, { "action": "expect", "selector": "input#reg-u", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "login form fields accept text", "tags": [ "@auth" ], "beforeEach": [ { "action": "hook", "name": "clearAuth" } ], "steps": [ { "action": "navigate", "url": "login" }, { "action": "waitForSelector", "selector": "input#username", "timeout": 15000 }, { "action": "fill", "label": "Username", "value": "testuser" }, { "action": "expect", "label": "Username", "assertion": { "matcher": "toHaveValue", "value": "testuser" } } ] }, { "name": "Monaco editor container renders on code tab", "tags": [ "@monaco", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container'], [data-testid='monaco-editor-skeleton']", "timeout": 8000 }, { "action": "expect", "testId": "monaco-editor-container", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='monaco-editor-container']", "state": "hidden" } } ] }, { "name": "Monaco editor skeleton shows while loading", "tags": [ "@monaco", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "expect", "testId": "monaco-editor-skeleton", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='monaco-editor-skeleton']", "state": "hidden" } } ] }, { "name": "Monaco editor ARIA status region is present", "tags": [ "@monaco", "@editor", "@a11y" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container']", "timeout": 8000 }, { "action": "expect", "testId": "monaco-editor-status", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "Monaco editor container has correct role and aria-label", "tags": [ "@monaco", "@editor", "@a11y" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container']", "timeout": 8000 }, { "action": "expect", "testId": "monaco-editor-container", "assertion": { "matcher": "toHaveAttribute", "name": "role", "value": "region" } } ] }, { "name": "Monaco editor word wrap toggled via checkbox", "tags": [ "@monaco", "@editor", "@config" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container']", "timeout": 8000 }, { "action": "expect", "testId": "monaco-editor-container", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "Monaco editor renders for each Monaco language mapping", "tags": [ "@monaco", "@languages", "@parameterized" ], "parameterize": { "data": [ { "lang": "JavaScript", "label": "javascript" }, { "lang": "TypeScript", "label": "typescript" }, { "lang": "Python", "label": "python" }, { "lang": "Go", "label": "go" }, { "lang": "Rust", "label": "rust" }, { "lang": "HTML", "label": "html" }, { "lang": "CSS", "label": "css" }, { "lang": "SQL", "label": "sql" }, { "lang": "Bash", "label": "bash" } ] }, "steps": [ { "action": "navigate", "url": "snippet/new?lang=${lang}" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container'], [data-testid='monaco-editor-skeleton']", "timeout": 8000 }, { "action": "expect", "testId": "code-editor-container", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "file tree renders on snippet editor code tab", "tags": [ "@filetree", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "expect", "testId": "file-tree", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "file tree add button is visible", "tags": [ "@filetree", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "expect", "testId": "file-tree-add-btn", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "file tree upload button is visible", "tags": [ "@filetree", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "expect", "testId": "file-tree-upload-btn", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "file tree add button opens new file input row", "tags": [ "@filetree", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "click", "testId": "file-tree-add-btn" }, { "action": "expect", "testId": "file-tree-adding-row", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "file-tree-new-name-input", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "file tree new name input accepts filename", "tags": [ "@filetree", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "click", "testId": "file-tree-add-btn" }, { "action": "fill", "testId": "file-tree-new-name-input", "value": "utils.js" }, { "action": "expect", "testId": "file-tree-new-name-input", "assertion": { "matcher": "toHaveValue", "value": "utils.js" } } ] }, { "name": "file tree cancel new file with Escape key", "tags": [ "@filetree", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "click", "testId": "file-tree-add-btn" }, { "action": "expect", "testId": "file-tree-adding-row", "assertion": { "matcher": "toBeVisible" } }, { "action": "press", "testId": "file-tree-new-name-input", "key": "Escape" }, { "action": "expect", "testId": "file-tree-adding-row", "assertion": { "matcher": "toBeHidden" } } ] }, { "name": "config defaultLanguage is JavaScript", "tags": [ "@config", "@snippets" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-language-select", "assertion": { "matcher": "toContainText", "text": "JavaScript" } } ] }, { "name": "config all 27 languages appear in language select", "tags": [ "@config", "@languages" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-language-select" }, { "action": "evaluate", "script": "(function(){ var opts = document.querySelectorAll('[data-testid^=\"language-option-\"]'); if (opts.length < 27) throw new Error('Expected 27+ languages, got ' + opts.length); return true; })()" }, { "action": "keyboard", "keys": "Escape" } ] }, { "name": "config codePreviewMaxLength truncates long previews", "tags": [ "@config", "@snippets" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "code-truncated-notice", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='code-truncated-notice']", "state": "hidden" } } ] }, { "name": "config copiedTimeout resets copy button after interaction", "tags": [ "@config", "@snippets" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-card-copy-btn", "skipIf": { "selector": "[data-testid='snippet-card-copy-btn']", "state": "hidden" } }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "config previewEnabledLanguages only show checkbox for supported langs", "tags": [ "@config", "@editor", "@parameterized" ], "parameterize": { "data": [ { "lang": "JavaScript", "expectCheckbox": "true", "label": "JavaScript has preview" }, { "lang": "TypeScript", "expectCheckbox": "true", "label": "TypeScript has preview" }, { "lang": "JSX", "expectCheckbox": "true", "label": "JSX has preview" }, { "lang": "TSX", "expectCheckbox": "true", "label": "TSX has preview" }, { "lang": "Python", "expectCheckbox": "false", "label": "Python has preview" } ] }, "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-language-select" }, { "action": "click", "testId": "language-option-${lang}" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='enable-preview-checkbox'],[data-testid='code-editor-container']", "timeout": 10000 }, { "action": "expect", "testId": "enable-preview-checkbox", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='enable-preview-checkbox']", "state": "hidden" } } ] }, { "name": "complete snippet creation user flow", "tags": [ "@flow", "@crud", "@smoke" ], "beforeEach": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" } ], "afterEach": [ { "action": "evaluate", "script": "localStorage.clear()" } ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-editor-page", "assertion": { "matcher": "toBeVisible" } }, { "action": "fill", "testId": "snippet-title-input", "value": "E2E Flow Test Snippet" }, { "action": "expect", "testId": "snippet-title-input", "assertion": { "matcher": "toHaveValue", "value": "E2E Flow Test Snippet" } }, { "action": "fill", "testId": "snippet-description-textarea", "value": "Created by E2E test" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='code-editor-container']", "timeout": 5000 }, { "action": "expect", "testId": "code-editor-container", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "editor-save-btn", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "complete settings storage configuration flow", "tags": [ "@flow", "@settings", "@storage" ], "steps": [ { "action": "navigate", "url": "settings?tab=storage" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "storage-backend-card", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "storage-option-indexeddb", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "backend-url", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "complete settings AI configuration flow", "tags": [ "@flow", "@settings", "@ai" ], "steps": [ { "action": "navigate", "url": "settings?tab=ai" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "openai-settings-card", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "ai-platform-select", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "openai-api-key-input", "assertion": { "matcher": "toBeVisible" } }, { "action": "fill", "testId": "openai-api-key-input", "value": "sk-test-12345" }, { "action": "expect", "testId": "toggle-api-key-visibility", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "save-api-key-btn", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "complete namespace creation flow", "tags": [ "@flow", "@namespace" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "create-namespace-trigger" }, { "action": "expect", "testId": "create-namespace-dialog", "assertion": { "matcher": "toBeVisible" } }, { "action": "fill", "testId": "namespace-name-input", "value": "Work Projects" }, { "action": "expect", "testId": "namespace-name-input", "assertion": { "matcher": "toHaveValue", "value": "Work Projects" } }, { "action": "expect", "testId": "create-namespace-save-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "create-namespace-cancel-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "click", "testId": "create-namespace-cancel-btn" }, { "action": "expect", "testId": "namespace-selector", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "complete preview configuration flow", "tags": [ "@flow", "@editor", "@params" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "fill", "testId": "snippet-title-input", "value": "React Component" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "expect", "testId": "enable-preview-checkbox", "assertion": { "matcher": "toBeVisible" } }, { "action": "check", "testId": "enable-preview-checkbox" }, { "action": "expect", "testId": "split-screen-editor-container", "assertion": { "matcher": "toBeVisible" } }, { "action": "click", "testId": "snippet-tab-2-btn" }, { "action": "expect", "testId": "input-parameters-card", "assertion": { "matcher": "toBeVisible" } }, { "action": "fill", "testId": "function-name-input", "value": "MyComponent" }, { "action": "expect", "testId": "function-name-input", "assertion": { "matcher": "toHaveValue", "value": "MyComponent" } }, { "action": "click", "testId": "add-parameter-btn" }, { "action": "expect", "selector": "[data-testid='param-item-0']", "assertion": { "matcher": "toBeVisible" } }, { "action": "fill", "selector": "[data-testid='param-name-input-0']", "value": "title" }, { "action": "expect", "selector": "[data-testid='param-name-input-0']", "assertion": { "matcher": "toHaveValue", "value": "title" } } ] }, { "name": "Monaco keyboard shortcut F5 triggers run (code terminal visible)", "tags": [ "@monaco", "@keyboard", "@terminal" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container']", "timeout": 8000 }, { "action": "expect", "testId": "code-editor-container", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet editor multi-step tab navigation flow", "tags": [ "@flow", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-tab-0-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "snippet-tab-1-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "click", "testId": "snippet-tab-0-btn" }, { "action": "expect", "testId": "snippet-form-fields", "assertion": { "matcher": "toBeVisible" } }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "expect", "testId": "code-editor-container", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet viewer page loads for share URL", "tags": [ "@viewer", "@smoke" ], "steps": [ { "action": "navigate", "url": "share/nonexistent-token" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "selector": "body", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "snippet code viewer renders code pane", "tags": [ "@viewer" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-editor-page", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "editor back navigation returns to home", "tags": [ "@flow", "@editor" ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "selector": "[aria-label='Back to snippets']" }, { "action": "waitForSelector", "selector": "[data-testid='namespace-selector'],[data-testid='snippet-manager-loading']", "timeout": 15000 }, { "action": "expect", "testId": "namespace-selector", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "theme switcher is present in layout", "tags": [ "@smoke", "@config" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "theme-switcher", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "language selector is present in layout", "tags": [ "@smoke", "@config" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "lang-selector", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "language selector opens locale picker", "tags": [ "@config", "@i18n" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "lang-trigger" }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "navigation sidebar toggle works", "tags": [ "@smoke", "@navigation" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "navigation-toggle-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "click", "testId": "navigation-toggle-btn" }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "navigation sidebar overlay closes sidebar", "tags": [ "@navigation" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "click", "testId": "navigation-toggle-btn", "skipIf": { "selector": "[data-testid='navigation-toggle-btn']", "state": "hidden" } }, { "action": "click", "testId": "navigation-sidebar-overlay", "skipIf": { "selector": "[data-testid='navigation-sidebar-overlay']", "state": "hidden" } }, { "action": "expect", "selector": "main", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "status alerts bell is visible", "tags": [ "@smoke", "@config" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "alerts-bell", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "status badge renders in layout", "tags": [ "@config" ], "steps": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "alerts-bell", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "create namespace end-to-end", "tags": [ "@e2e", "@namespace" ], "beforeEach": [ { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" } ], "afterEach": [ { "action": "evaluate", "script": "localStorage.clear()" } ], "steps": [ { "action": "hook", "name": "loginViaApi" }, { "action": "navigate", "url": "" }, { "action": "waitForSelector", "selector": "[data-testid='namespace-selector'],[data-testid='snippet-manager-loading']", "timeout": 15000 }, { "action": "waitForSelector", "selector": "[data-testid='create-namespace-trigger']", "timeout": 15000 }, { "action": "click", "testId": "create-namespace-trigger" }, { "action": "expect", "testId": "create-namespace-dialog", "assertion": { "matcher": "toBeVisible" } }, { "action": "fill", "testId": "namespace-name-input", "value": "My E2E Namespace" }, { "action": "expect", "testId": "namespace-name-input", "assertion": { "matcher": "toHaveValue", "value": "My E2E Namespace" } }, { "action": "click", "testId": "create-namespace-save-btn" }, { "action": "waitForHidden", "selector": "[data-testid='create-namespace-dialog']", "timeout": 10000 }, { "action": "expect", "testId": "namespace-selector", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "create JavaScript snippet via editor end-to-end", "tags": [ "@e2e", "@snippets", "@crud" ], "beforeEach": [ { "action": "hook", "name": "loginViaApi" }, { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "evaluate", "script": "localStorage.clear()" }, { "action": "reload" }, { "action": "waitForLoadState", "state": "domcontentloaded" } ], "afterEach": [ { "action": "evaluate", "script": "localStorage.clear()" } ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "fill", "testId": "snippet-title-input", "value": "E2E JS Snippet" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container'] .monaco-editor textarea", "timeout": 30000 }, { "action": "click", "selector": "[data-testid='monaco-editor-container'] .monaco-editor" }, { "action": "keyboard", "keys": [ "Control+a", "Control+a" ] }, { "action": "pageType", "text": "console.log('Hello from E2E');" }, { "action": "click", "testId": "editor-save-btn" }, { "action": "waitForURL", "urlPattern": "**/pastebin**", "timeout": 15000 }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-manager-redux", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "snippet-card-view-btn", "assertion": { "matcher": "toBeVisible" }, "nth": 0 } ] }, { "name": "create Python snippet and navigate to view page", "tags": [ "@e2e", "@snippets", "@python" ], "beforeEach": [ { "action": "hook", "name": "loginViaApi" }, { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "evaluate", "script": "localStorage.clear()" }, { "action": "reload" }, { "action": "waitForLoadState", "state": "domcontentloaded" } ], "afterEach": [ { "action": "evaluate", "script": "localStorage.clear()" } ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "fill", "testId": "snippet-title-input", "value": "E2E Python Hello World" }, { "action": "click", "testId": "snippet-language-select" }, { "action": "click", "testId": "language-option-Python" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container'] .monaco-editor textarea", "timeout": 30000 }, { "action": "click", "selector": "[data-testid='monaco-editor-container'] .monaco-editor" }, { "action": "keyboard", "keys": [ "Control+a", "Control+a" ] }, { "action": "pageType", "text": "print(\"Hello, World!\")" }, { "action": "click", "testId": "editor-save-btn" }, { "action": "waitForURL", "urlPattern": "**/pastebin**", "timeout": 15000 }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-manager-redux", "assertion": { "matcher": "toBeVisible" } }, { "action": "waitForSelector", "selector": "[data-testid='snippet-card-view-btn']", "timeout": 10000 }, { "action": "click", "testId": "snippet-card-view-btn", "nth": 0 }, { "action": "waitForSelector", "selector": "[data-testid='snippet-view-page']", "timeout": 15000 }, { "action": "expect", "testId": "run-code-btn", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "run Python snippet and verify terminal activates", "tags": [ "@e2e", "@python", "@terminal", "@run" ], "beforeEach": [ { "action": "hook", "name": "loginViaApi" }, { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "evaluate", "script": "localStorage.clear()" }, { "action": "reload" }, { "action": "waitForLoadState", "state": "domcontentloaded" } ], "afterEach": [ { "action": "evaluate", "script": "localStorage.clear()" } ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "fill", "testId": "snippet-title-input", "value": "Run Test Python" }, { "action": "click", "testId": "snippet-language-select" }, { "action": "click", "testId": "language-option-Python" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container'] .monaco-editor textarea", "timeout": 30000 }, { "action": "click", "selector": "[data-testid='monaco-editor-container'] .monaco-editor" }, { "action": "keyboard", "keys": [ "Control+a", "Control+a" ] }, { "action": "pageType", "text": "print(\"Hello, World!\")" }, { "action": "click", "testId": "editor-save-btn" }, { "action": "waitForURL", "urlPattern": "**/pastebin**", "timeout": 15000 }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "waitForSelector", "selector": "[data-testid='snippet-card-view-btn']", "timeout": 10000 }, { "action": "click", "testId": "snippet-card-view-btn", "nth": 0 }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-view-page", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "run-code-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "click", "testId": "run-code-btn" }, { "action": "expect", "testId": "terminal-output-area", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "terminal-status", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "run JavaScript snippet and verify terminal activates", "tags": [ "@e2e", "@terminal", "@run" ], "beforeEach": [ { "action": "hook", "name": "loginViaApi" }, { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "evaluate", "script": "localStorage.clear()" }, { "action": "reload" }, { "action": "waitForLoadState", "state": "domcontentloaded" } ], "afterEach": [ { "action": "evaluate", "script": "localStorage.clear()" } ], "steps": [ { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "fill", "testId": "snippet-title-input", "value": "Run Test JavaScript" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container'] .monaco-editor textarea", "timeout": 30000 }, { "action": "click", "selector": "[data-testid='monaco-editor-container'] .monaco-editor" }, { "action": "keyboard", "keys": [ "Control+a", "Control+a" ] }, { "action": "pageType", "text": "console.log('Hello from JavaScript');" }, { "action": "click", "testId": "editor-save-btn" }, { "action": "waitForURL", "urlPattern": "**/pastebin**", "timeout": 15000 }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "waitForSelector", "selector": "[data-testid='snippet-card-view-btn']", "timeout": 10000 }, { "action": "click", "testId": "snippet-card-view-btn", "nth": 0 }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-view-page", "assertion": { "matcher": "toBeVisible" } }, { "action": "expect", "testId": "run-code-btn", "assertion": { "matcher": "toBeVisible" } }, { "action": "click", "testId": "run-code-btn" }, { "action": "expect", "testId": "terminal-output-area", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "create snippet via dialog end-to-end", "tags": [ "@e2e", "@snippets", "@crud" ], "beforeEach": [ { "action": "hook", "name": "loginViaApi" }, { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "evaluate", "script": "localStorage.clear()" }, { "action": "reload" }, { "action": "waitForLoadState", "state": "domcontentloaded" } ], "afterEach": [ { "action": "evaluate", "script": "localStorage.clear()" } ], "steps": [ { "action": "click", "testId": "empty-state-create-menu", "skipIf": { "selector": "[data-testid='empty-state-create-menu']", "state": "hidden" } }, { "action": "click", "testId": "create-blank-snippet-item", "skipIf": { "selector": "[data-testid='create-blank-snippet-item']", "state": "hidden" } }, { "action": "fill", "testId": "snippet-title-input", "value": "Dialog Created Snippet", "skipIf": { "selector": "[data-testid='snippet-dialog']", "state": "hidden" } }, { "action": "click", "testId": "snippet-dialog-save-btn", "skipIf": { "selector": "[data-testid='snippet-dialog-save-btn']", "state": "hidden" } }, { "action": "wait", "timeout": 500 }, { "action": "expect", "testId": "snippet-manager-redux", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "create namespace then create snippet in it", "tags": [ "@e2e", "@namespace", "@snippets" ], "beforeEach": [ { "action": "hook", "name": "loginViaApi" }, { "action": "navigate", "url": "" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "evaluate", "script": "localStorage.clear()" }, { "action": "reload" }, { "action": "waitForLoadState", "state": "domcontentloaded" } ], "afterEach": [ { "action": "evaluate", "script": "localStorage.clear()" } ], "steps": [ { "action": "click", "testId": "create-namespace-trigger" }, { "action": "expect", "testId": "create-namespace-dialog", "assertion": { "matcher": "toBeVisible" } }, { "action": "fill", "testId": "namespace-name-input", "value": "Work" }, { "action": "click", "testId": "create-namespace-save-btn" }, { "action": "waitForHidden", "selector": "[data-testid='create-namespace-dialog']", "timeout": 5000 }, { "action": "expect", "testId": "namespace-selector", "assertion": { "matcher": "toBeVisible" } }, { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "fill", "testId": "snippet-title-input", "value": "Work Snippet" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container'] .monaco-editor textarea", "timeout": 30000 }, { "action": "click", "selector": "[data-testid='monaco-editor-container'] .monaco-editor" }, { "action": "keyboard", "keys": [ "Control+a" ] }, { "action": "pageType", "text": "// Work snippet code" }, { "action": "click", "testId": "editor-save-btn" }, { "action": "waitForURL", "urlPattern": "**/pastebin**", "timeout": 15000 }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "snippet-manager-redux", "assertion": { "matcher": "toBeVisible" } } ] }, { "name": "run-code-btn is present on snippet view page", "tags": [ "@viewer", "@run" ], "steps": [ { "action": "hook", "name": "loginViaApi" }, { "action": "navigate", "url": "snippet/new" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "fill", "testId": "snippet-title-input", "value": "Quick Run Test" }, { "action": "click", "testId": "snippet-language-select" }, { "action": "click", "testId": "language-option-Python" }, { "action": "click", "testId": "snippet-tab-1-btn" }, { "action": "waitForSelector", "selector": "[data-testid='monaco-editor-container'] .monaco-editor textarea", "timeout": 30000 }, { "action": "click", "selector": "[data-testid='monaco-editor-container'] .monaco-editor" }, { "action": "keyboard", "keys": [ "Control+a" ] }, { "action": "pageType", "text": "print('hi')" }, { "action": "click", "testId": "editor-save-btn" }, { "action": "waitForURL", "urlPattern": "**/pastebin**", "timeout": 15000 }, { "action": "evaluate", "script": "(function(){ var btn = document.querySelector('[data-testid=\"snippet-card-view-btn\"]'); if (btn) { btn.click(); return true; } return false; })()" }, { "action": "waitForLoadState", "state": "domcontentloaded" }, { "action": "expect", "testId": "run-code-btn", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='run-code-btn']", "state": "hidden" } }, { "action": "expect", "testId": "stop-code-btn", "assertion": { "matcher": "toBeVisible" }, "skipIf": { "selector": "[data-testid='stop-code-btn']", "state": "hidden" } } ] } ] }