Skip to content

Commit 384c924

Browse files
committed
fixup!: combine e2e tests
1 parent df8fff6 commit 384c924

File tree

2 files changed

+22
-26
lines changed

2 files changed

+22
-26
lines changed

test/e2e/downloads.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,25 @@ describe("Downloads (enabled)", true, [], {}, async () => {
2424
expect(await codeServerPage.page.isVisible("text=Download...")).toBe(true)
2525
})
2626
})
27+
28+
describe("Downloads (disabled)", true, ["--disable-file-downloads"], {}, async () => {
29+
const testName = "downloads"
30+
test.beforeAll(async () => {
31+
await clean(testName)
32+
})
33+
34+
test("should not see the 'Download...' option", async ({ codeServerPage }) => {
35+
// Setup
36+
const workspaceDir = await codeServerPage.workspaceDir
37+
const tmpFilePath = path.join(workspaceDir, "unique-file.txt")
38+
await fs.writeFile(tmpFilePath, "hello world")
39+
40+
// Action
41+
const fileInExplorer = await codeServerPage.page.waitForSelector("text=unique-file.txt")
42+
await fileInExplorer.click({
43+
button: "right",
44+
})
45+
46+
expect(await codeServerPage.page.isVisible("text=Download...")).toBe(false)
47+
})
48+
})

test/e2e/downloadsDisabled.test.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)