mirror of
https://github.com/coder/code-server.git
synced 2025-07-25 10:53:24 +08: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)
|
||||
})
|
||||
|
@ -28,10 +28,11 @@ const config: PlaywrightTestConfig = {
|
||||
name: "Chromium",
|
||||
use: { browserName: "chromium" },
|
||||
},
|
||||
{
|
||||
name: "Firefox",
|
||||
use: { browserName: "firefox" },
|
||||
},
|
||||
// Firefox seems to have bugs with opening context menus in the file tree.
|
||||
// {
|
||||
// name: "Firefox",
|
||||
// use: { browserName: "firefox" },
|
||||
// },
|
||||
{
|
||||
name: "WebKit",
|
||||
use: { browserName: "webkit" },
|
||||
|
Reference in New Issue
Block a user