mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	e2e(server): broken test after switch to combobox
This commit is contained in:
		| @@ -42,19 +42,21 @@ test("User can change language from settings", async ({ page, context }) => { | |||||||
|  |  | ||||||
|     // Check that the default value (English) is set. |     // Check that the default value (English) is set. | ||||||
|     await expect(app.currentNoteSplit).toContainText("First day of the week"); |     await expect(app.currentNoteSplit).toContainText("First day of the week"); | ||||||
|     const languageCombobox = app.currentNoteSplit.getByRole("combobox").first(); |     const languageCombobox = app.currentNoteSplit.locator(".options-section .dropdown").first(); | ||||||
|     await expect(languageCombobox).toHaveValue("en"); |     await expect(languageCombobox).toContainText("English"); | ||||||
|  |  | ||||||
|     // Select Chinese and ensure the translation is set. |     // Select Chinese and ensure the translation is set. | ||||||
|     await languageCombobox.selectOption("cn"); |     await languageCombobox.locator(".dropdown-toggle").click(); | ||||||
|  |     await languageCombobox.locator(".dropdown-item", { hasText: "简体中文" }).click(); | ||||||
|     await app.currentNoteSplit.locator("button[name=restart-app-button]").click(); |     await app.currentNoteSplit.locator("button[name=restart-app-button]").click(); | ||||||
|  |  | ||||||
|     await expect(app.currentNoteSplit).toContainText("一周的第一天", { timeout: 15000 }); |     await expect(app.currentNoteSplit).toContainText("一周的第一天", { timeout: 15000 }); | ||||||
|     await expect(languageCombobox).toHaveValue("cn"); |     await expect(languageCombobox).toContainText("简体中文"); | ||||||
|  |  | ||||||
|     // Select English again. |     // Select English again. | ||||||
|     await languageCombobox.selectOption("en"); |     await languageCombobox.locator(".dropdown-toggle").click(); | ||||||
|  |     await languageCombobox.locator(".dropdown-item", { hasText: "English" }).click(); | ||||||
|     await app.currentNoteSplit.locator("button[name=restart-app-button]").click(); |     await app.currentNoteSplit.locator("button[name=restart-app-button]").click(); | ||||||
|     await expect(app.currentNoteSplit).toContainText("Language", { timeout: 15000 }); |     await expect(app.currentNoteSplit).toContainText("Language", { timeout: 15000 }); | ||||||
|     await expect(languageCombobox).toHaveValue("en"); |     await expect(languageCombobox).toContainText("English"); | ||||||
| }); | }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user