GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(app): settings smoke tests · bewareoftheleopard/opencode@6f7d710

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/app/e2e
    • settings.spec.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/app/e2e/settings.spec.ts‎

Copy file name to clipboard
+44Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { test, expect } from "./fixtures"
2+
import { modKey } from "./utils"
3+
4+
test("smoke settings dialog opens, switches tabs, closes", async ({ page, gotoSession }) => {
5+
await gotoSession()
6+
7+
const dialog = page.getByRole("dialog")
8+
9+
await page.keyboard.press(`${modKey}+Comma`).catch(() => undefined)
10+
11+
const opened = await dialog
12+
.waitFor({ state: "visible", timeout: 3000 })
13+
.then(() => true)
14+
.catch(() => false)
15+
16+
if (!opened) {
17+
await page.getByRole("button", { name: "Settings" }).first().click()
18+
await expect(dialog).toBeVisible()
19+
}
20+
21+
await dialog.getByRole("tab", { name: "Shortcuts" }).click()
22+
await expect(dialog.getByRole("button", { name: "Reset to defaults" })).toBeVisible()
23+
await expect(dialog.getByPlaceholder("Search shortcuts")).toBeVisible()
24+
25+
await page.keyboard.press("Escape")
26+
27+
const closed = await dialog
28+
.waitFor({ state: "detached", timeout: 1500 })
29+
.then(() => true)
30+
.catch(() => false)
31+
32+
if (closed) return
33+
34+
await page.keyboard.press("Escape")
35+
const closedSecond = await dialog
36+
.waitFor({ state: "detached", timeout: 1500 })
37+
.then(() => true)
38+
.catch(() => false)
39+
40+
if (closedSecond) return
41+
42+
await page.locator('[data-component="dialog-overlay"]').click({ position: { x: 5, y: 5 } })
43+
await expect(dialog).toHaveCount(0)
44+
})

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.