Skip to content

Commit c8d8d08

Browse files
committed
Change version test to look for specific version
This will catch if we are not sending the actual version to the client.
1 parent 06b0422 commit c8d8d08

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/e2e/openHelpAbout.test.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
import { version } from "../../src/node/constants"
12
import { describe, test, expect } from "./baseFixture"
23

34
describe("Open Help > About", true, [], {}, () => {
45
test("should see code-server version in about dialog", async ({ codeServerPage }) => {
56
// Open using the menu.
67
await codeServerPage.navigateMenus(["Help", "About"])
78

9+
const isDevMode = process.env.VSCODE_DEV === "1"
10+
811
// Look for code-server info div.
9-
const element = await codeServerPage.page.waitForSelector('div[role="dialog"] >> text=code-server')
12+
const element = await codeServerPage.page.waitForSelector(
13+
`div[role="dialog"] >> text=code-server: ${isDevMode ? "Unknown" : "v" + version}`,
14+
)
1015
expect(element).not.toBeNull()
1116
})
1217
})

0 commit comments

Comments
 (0)