test(app): more e2e tests
This commit is contained in:
20
packages/app/e2e/sidebar.spec.ts
Normal file
20
packages/app/e2e/sidebar.spec.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
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()
|
||||
})
|
||||
Reference in New Issue
Block a user