|
|
@@ -1,5 +1,11 @@
|
|
|
import { test, expect, type TestFixtures } from "./playwright-base-test"
|
|
|
-import { findWebview, upsertApiConfiguration, verifyExtensionInstalled, clickSaveSettingsButton } from "../helpers"
|
|
|
+import {
|
|
|
+ findWebview,
|
|
|
+ upsertApiConfiguration,
|
|
|
+ verifyExtensionInstalled,
|
|
|
+ clickSaveSettingsButton,
|
|
|
+ waitForTooltipsToDismiss,
|
|
|
+} from "../helpers"
|
|
|
|
|
|
test.describe("Settings", () => {
|
|
|
test("screenshots", async ({ workbox: page, takeScreenshot }: TestFixtures) => {
|
|
|
@@ -8,9 +14,10 @@ test.describe("Settings", () => {
|
|
|
|
|
|
// Open the settings then move the mouse to avoid triggering the tooltip
|
|
|
const webviewFrame = await findWebview(page)
|
|
|
- page.locator('[aria-label*="Settings"], [title*="Settings"]').first().click()
|
|
|
- await clickSaveSettingsButton(webviewFrame)
|
|
|
+ await page.locator('[aria-label*="Settings"], [title*="Settings"]').first().click()
|
|
|
+ await page.mouse.move(0, 0) // Move cursor to top-left corner to avoid triggering hover states
|
|
|
|
|
|
+ await clickSaveSettingsButton(webviewFrame)
|
|
|
await expect(webviewFrame.locator('[role="tablist"]')).toBeVisible({ timeout: 10000 })
|
|
|
console.log("✅ Settings view loaded")
|
|
|
|
|
|
@@ -35,6 +42,7 @@ test.describe("Settings", () => {
|
|
|
const sectionId = testId?.replace("tab-", "") || `section-${i}`
|
|
|
|
|
|
await clickSaveSettingsButton(webviewFrame) // To avoid flakey screenshots
|
|
|
+ await waitForTooltipsToDismiss(webviewFrame) // Wait for tooltips to dismiss before screenshot
|
|
|
await takeScreenshot(`${i}-settings-${sectionId}-${tabName.toLowerCase().replace(/\s+/g, "-")}`)
|
|
|
}
|
|
|
|