Skip to content

Commit 6c1139c

Browse files
committed
feat: add quickOpen to CodeServer object
1 parent e191c48 commit 6c1139c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

test/e2e/codeServer.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,12 @@ test.describe("CodeServer", () => {
3535
await codeServer.viewTerminal()
3636
expect(await page.isVisible("#terminal")).toBe(true)
3737
})
38+
39+
test.only("should open a file with quickOpen", options, async ({ page }) => {
40+
await codeServer.openFolder()
41+
await codeServer.quickOpen("extensions.json")
42+
// If the file is open, we will see an empty array
43+
// assuming no extensions are installed
44+
expect(await page.isVisible("text=[]"))
45+
})
3846
})

test/e2e/models/CodeServer.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,11 @@ export class CodeServer {
4444
await this.page.waitForSelector("#terminal")
4545
}
4646
}
47+
48+
async quickOpen(input: string) {
49+
await this.page.keyboard.press("Meta+P")
50+
await this.page.waitForSelector('[aria-describedby="quickInput_message"]')
51+
await this.page.keyboard.type(input)
52+
await this.page.keyboard.press("Enter")
53+
}
4754
}

0 commit comments

Comments
 (0)