Skip to content

Commit 261390a

Browse files
committed
refactor: simplify test
1 parent 000ebd1 commit 261390a

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

test/e2e/displayLang.test.ts

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
import * as path from "path"
22
import { describe, test, expect } from "./baseFixture"
33

4-
// Given a code-server environment with Spanish Language Pack downloaded
4+
// Given a code-server environment with Spanish Language Pack extension installed
5+
// and a languagepacks.json in the data-dir
56
const flags = ["--extensions-dir", path.join(__dirname, "./extensions"), "--locale", "es"]
67

7-
describe("Display language patch", flags, {}, () => {
8-
test("should allow you to load code-server in Spanish", async ({ codeServerPage }) => {
9-
test.setTimeout(45000)
10-
11-
await codeServerPage.page.click(".extensions-badge")
12-
13-
// Click [aria-label="Spanish Language Pack for Visual Studio Code, 1.70.0, Publisher MS-CEINTL, Language pack extension for Spanish"] >> text=Set Display Language
14-
await codeServerPage.page.click(
15-
'[aria-label="Spanish Language Pack for Visual Studio Code, 1.70.0, Publisher MS-CEINTL, Language pack extension for Spanish"] >> text=Set Display Language',
16-
)
17-
18-
// Click text=Restart
19-
await Promise.all([codeServerPage.page.waitForNavigation(), codeServerPage.page.click("text=Restart")])
20-
21-
await codeServerPage.page.waitForTimeout(10000)
22-
// Click text=Extensiones
23-
const visible = await codeServerPage.page.isVisible("text=Extensiones")
8+
describe("--locale es", flags, {}, () => {
9+
test("should load code-server in Spanish", async ({ codeServerPage }) => {
10+
// When
11+
const visible = await codeServerPage.page.isVisible("text=Explorador")
2412

2513
// Then
2614
expect(visible).toBe(true)

0 commit comments

Comments
 (0)