Skip to content

Commit ccc5f82

Browse files
committed
Refresh explorer after creating file
The watcher seems to not be catching this...unsure if it is a bug yet.
1 parent abe1584 commit ccc5f82

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/e2e/downloads.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ describe("Downloads (enabled)", ["--disable-workspace-trust"], {}, async () => {
1414
const workspaceDir = await codeServerPage.workspaceDir
1515
const tmpFilePath = path.join(workspaceDir, "unique-file.txt")
1616
await fs.writeFile(tmpFilePath, "hello world")
17+
await codeServerPage.executeCommandViaMenus("Refresh Explorer")
1718

1819
// Action
1920
const fileInExplorer = await codeServerPage.page.waitForSelector("text=unique-file.txt")
@@ -30,6 +31,7 @@ describe("Downloads (enabled)", ["--disable-workspace-trust"], {}, async () => {
3031
const fileName = "unique-file-save-as.txt"
3132
const tmpFilePath = path.join(workspaceDir, fileName)
3233
await fs.writeFile(tmpFilePath, "Hello World")
34+
await codeServerPage.executeCommandViaMenus("Refresh Explorer")
3335

3436
// Action
3537
await codeServerPage.page.waitForSelector(`text=${fileName}`)
@@ -71,6 +73,7 @@ describe("Downloads (disabled)", ["--disable-workspace-trust", "--disable-file-d
7173
const workspaceDir = await codeServerPage.workspaceDir
7274
const tmpFilePath = path.join(workspaceDir, "unique-file.txt")
7375
await fs.writeFile(tmpFilePath, "Hello World")
76+
await codeServerPage.executeCommandViaMenus("Refresh Explorer")
7477

7578
// Action
7679
const fileInExplorer = await codeServerPage.page.waitForSelector("text=unique-file.txt")
@@ -87,6 +90,7 @@ describe("Downloads (disabled)", ["--disable-workspace-trust", "--disable-file-d
8790
const fileName = "unique-file-save-as.txt"
8891
const tmpFilePath = path.join(workspaceDir, fileName)
8992
await fs.writeFile(tmpFilePath, "Hello World")
93+
await codeServerPage.executeCommandViaMenus("Refresh Explorer")
9094

9195
// Action
9296
await codeServerPage.page.waitForSelector(`text=${fileName}`)

test/e2e/uploads.test.ts

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ describe("Uploads (enabled)", ["--disable-workspace-trust"], {}, () => {
1414
const workspaceDir = await codeServerPage.workspaceDir
1515
const tmpDirPath = path.join(workspaceDir, "test-directory")
1616
await fs.mkdir(tmpDirPath)
17+
await codeServerPage.executeCommandViaMenus("Refresh Explorer")
1718

1819
// Action
1920
const fileInExplorer = await codeServerPage.page.waitForSelector('span:has-text("test-directory")')
@@ -42,6 +43,7 @@ describe("Uploads (disabled)", ["--disable-workspace-trust", "--disable-file-upl
4243
const workspaceDir = await codeServerPage.workspaceDir
4344
const tmpDirPath = path.join(workspaceDir, "test-directory")
4445
await fs.mkdir(tmpDirPath)
46+
await codeServerPage.executeCommandViaMenus("Refresh Explorer")
4547

4648
// Action
4749
const fileInExplorer = await codeServerPage.page.waitForSelector('span:has-text("test-directory")')

0 commit comments

Comments
 (0)