refactor(app): refactored tests + added project tests (#11349)

This commit is contained in:
Filip
2026-01-30 21:59:37 +01:00
committed by opencode
parent 4a56491e42
commit 77fa8ddc88
29 changed files with 409 additions and 221 deletions

View File

@@ -1,5 +1,6 @@
import { test, expect } from "../fixtures"
import { modKey, settingsLanguageSelectSelector } from "../utils"
import { settingsLanguageSelectSelector } from "../selectors"
import { openSettings } from "../actions"
test("smoke changing language updates settings labels", async ({ page, gotoSession }) => {
await page.addInitScript(() => {
@@ -8,19 +9,7 @@ test("smoke changing language updates settings labels", async ({ page, gotoSessi
await gotoSession()
const dialog = page.getByRole("dialog")
await page.keyboard.press(`${modKey}+Comma`).catch(() => undefined)
const opened = await dialog
.waitFor({ state: "visible", timeout: 3000 })
.then(() => true)
.catch(() => false)
if (!opened) {
await page.getByRole("button", { name: "Settings" }).first().click()
await expect(dialog).toBeVisible()
}
const dialog = await openSettings(page)
const heading = dialog.getByRole("heading", { level: 2 })
await expect(heading).toHaveText("General")