mirror of
https://github.com/coder/code-server.git
synced 2026-04-13 03:05:50 -05:00
Update Code to 1.93.1 (#6984)
This commit is contained in:
@@ -16,10 +16,7 @@ describe("Downloads (enabled)", ["--disable-workspace-trust"], {}, async () => {
|
||||
await fs.writeFile(tmpFilePath, "hello world")
|
||||
|
||||
// Action
|
||||
const fileInExplorer = await codeServerPage.page.waitForSelector("text=unique-file.txt")
|
||||
await fileInExplorer.click({
|
||||
button: "right",
|
||||
})
|
||||
await codeServerPage.openContextMenu("text=unique-file.txt")
|
||||
|
||||
expect(await codeServerPage.page.isVisible("text=Download...")).toBe(true)
|
||||
})
|
||||
@@ -73,10 +70,7 @@ describe("Downloads (disabled)", ["--disable-workspace-trust", "--disable-file-d
|
||||
await fs.writeFile(tmpFilePath, "Hello World")
|
||||
|
||||
// Action
|
||||
const fileInExplorer = await codeServerPage.page.waitForSelector("text=unique-file.txt")
|
||||
await fileInExplorer.click({
|
||||
button: "right",
|
||||
})
|
||||
await codeServerPage.openContextMenu("text=unique-file.txt")
|
||||
|
||||
expect(await codeServerPage.page.isVisible("text=Download...")).toBe(false)
|
||||
})
|
||||
|
||||
@@ -555,6 +555,15 @@ export class CodeServerPage {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Open context menu on the specified selector.
|
||||
*/
|
||||
async openContextMenu(selector: string): Promise<void> {
|
||||
const el = await this.page.waitForSelector(selector)
|
||||
await el.click({ button: "right" })
|
||||
await this.page.waitForSelector(".context-view-block")
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute a command in the root of the instance's workspace directory.
|
||||
*/
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user