2026-01-05 00:37:40 +09:00
|
|
|
import { expect, getIframe, openSettings, test } from "./lib/fixtures"
|
2026-01-04 19:33:02 +09:00
|
|
|
|
|
|
|
|
test.describe("Smoke Tests", () => {
|
|
|
|
|
test("homepage loads without errors", async ({ page }) => {
|
|
|
|
|
const errors: string[] = []
|
|
|
|
|
page.on("pageerror", (err) => errors.push(err.message))
|
|
|
|
|
|
|
|
|
|
await page.goto("/", { waitUntil: "networkidle" })
|
|
|
|
|
await expect(page).toHaveTitle(/Draw\.io/i, { timeout: 10000 })
|
|
|
|
|
|
2026-01-05 00:37:40 +09:00
|
|
|
const iframe = getIframe(page)
|
2026-01-04 19:33:02 +09:00
|
|
|
await expect(iframe).toBeVisible({ timeout: 30000 })
|
|
|
|
|
|
|
|
|
|
expect(errors).toEqual([])
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
test("Japanese locale page loads", async ({ page }) => {
|
|
|
|
|
const errors: string[] = []
|
|
|
|
|
page.on("pageerror", (err) => errors.push(err.message))
|
|
|
|
|
|
|
|
|
|
await page.goto("/ja", { waitUntil: "networkidle" })
|
|
|
|
|
await expect(page).toHaveTitle(/Draw\.io/i, { timeout: 10000 })
|
|
|
|
|
|
2026-01-05 00:37:40 +09:00
|
|
|
const iframe = getIframe(page)
|
2026-01-04 19:33:02 +09:00
|
|
|
await expect(iframe).toBeVisible({ timeout: 30000 })
|
|
|
|
|
|
|
|
|
|
expect(errors).toEqual([])
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
test("settings dialog opens", async ({ page }) => {
|
2026-01-04 19:58:48 +09:00
|
|
|
await page.goto("/", { waitUntil: "networkidle" })
|
2026-01-05 00:37:40 +09:00
|
|
|
await getIframe(page).waitFor({ state: "visible", timeout: 30000 })
|
2026-01-04 19:33:02 +09:00
|
|
|
|
2026-01-05 00:37:40 +09:00
|
|
|
await openSettings(page)
|
2026-01-04 19:33:02 +09:00
|
|
|
})
|
|
|
|
|
})
|