mirror of https://github.com/coder/code-server.git
Same fix for upload tests
This commit is contained in:
parent
1676fd99a7
commit
dea5e8d9a9
|
@ -18,7 +18,6 @@ describe("Downloads (enabled)", ["--disable-workspace-trust"], {}, async () => {
|
|||
// Action
|
||||
await codeServerPage.openContextMenu("text=unique-file.txt")
|
||||
|
||||
await codeServerPage.page.waitForSelector(".context-view-block")
|
||||
expect(await codeServerPage.page.isVisible("text=Download...")).toBe(true)
|
||||
})
|
||||
|
||||
|
@ -73,7 +72,6 @@ describe("Downloads (disabled)", ["--disable-workspace-trust", "--disable-file-d
|
|||
// Action
|
||||
await codeServerPage.openContextMenu("text=unique-file.txt")
|
||||
|
||||
await codeServerPage.page.waitForSelector(".context-view-block")
|
||||
expect(await codeServerPage.page.isVisible("text=Download...")).toBe(false)
|
||||
})
|
||||
|
||||
|
|
|
@ -566,6 +566,7 @@ export class CodeServerPage {
|
|||
const el = await this.page.waitForSelector(selector)
|
||||
await el.click({ button: "left" })
|
||||
await this.page.keyboard.press("Shift+F10")
|
||||
await this.page.waitForSelector(".context-view-block")
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,10 +16,8 @@ describe("Uploads (enabled)", ["--disable-workspace-trust"], {}, () => {
|
|||
await fs.mkdir(tmpDirPath)
|
||||
|
||||
// Action
|
||||
const fileInExplorer = await codeServerPage.page.waitForSelector('span:has-text("test-directory")')
|
||||
await fileInExplorer.click({
|
||||
button: "right",
|
||||
})
|
||||
await codeServerPage.openContextMenu('span:has-text("test-directory")')
|
||||
|
||||
expect(await codeServerPage.page.isVisible("text=Upload...")).toBe(true)
|
||||
})
|
||||
|
||||
|
@ -44,10 +42,7 @@ describe("Uploads (disabled)", ["--disable-workspace-trust", "--disable-file-upl
|
|||
await fs.mkdir(tmpDirPath)
|
||||
|
||||
// Action
|
||||
const fileInExplorer = await codeServerPage.page.waitForSelector('span:has-text("test-directory")')
|
||||
await fileInExplorer.click({
|
||||
button: "right",
|
||||
})
|
||||
await codeServerPage.openContextMenu('span:has-text("test-directory")')
|
||||
|
||||
expect(await codeServerPage.page.isVisible("text=Upload...")).toBe(false)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue