Files
opencode/packages/app/e2e/sidebar.spec.ts
2026-01-19 09:03:52 -06:00

21 lines
613 B
TypeScript

import { test, expect } from "./fixtures"
import { modKey } from "./utils"
test("sidebar can be collapsed and expanded", async ({ page, gotoSession }) => {
await gotoSession()
const createButton = page.getByRole("button", { name: /New (session|workspace)/ }).first()
const opened = (await createButton.count()) > 0
if (!opened) {
await page.keyboard.press(`${modKey}+B`)
await expect(createButton).toBeVisible()
}
await page.keyboard.press(`${modKey}+B`)
await expect(createButton).toHaveCount(0)
await page.keyboard.press(`${modKey}+B`)
await expect(createButton).toBeVisible()
})