Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup!: combine e2e tests
  • Loading branch information
jsjoeio committed Apr 11, 2022
commit 384c924572766d9a20c9a032be89712c14ab9d64
22 changes: 22 additions & 0 deletions test/e2e/downloads.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,25 @@ describe("Downloads (enabled)", true, [], {}, async () => {
expect(await codeServerPage.page.isVisible("text=Download...")).toBe(true)
})
})

describe("Downloads (disabled)", true, ["--disable-file-downloads"], {}, async () => {
const testName = "downloads"
test.beforeAll(async () => {
await clean(testName)
})

test("should not see the 'Download...' option", async ({ codeServerPage }) => {
// Setup
const workspaceDir = await codeServerPage.workspaceDir
const tmpFilePath = path.join(workspaceDir, "unique-file.txt")
await fs.writeFile(tmpFilePath, "hello world")

// Action
const fileInExplorer = await codeServerPage.page.waitForSelector("text=unique-file.txt")
await fileInExplorer.click({
button: "right",
})

expect(await codeServerPage.page.isVisible("text=Download...")).toBe(false)
})
})
26 changes: 0 additions & 26 deletions test/e2e/downloadsDisabled.test.ts

This file was deleted.