mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-19 18:21:37 +08:00
chore(e2e): port old test for checking desktop language
This commit is contained in:
parent
dc83ba51db
commit
c641ce26d1
@ -1,6 +1,14 @@
|
|||||||
import { test, expect, Page } from "@playwright/test";
|
import { test, expect, Page } from "@playwright/test";
|
||||||
import App from "./support/app";
|
import App from "./support/app";
|
||||||
|
|
||||||
|
test("Displays translation on desktop", async ({ page }) => {
|
||||||
|
const app = new App(page);
|
||||||
|
await app.goto();
|
||||||
|
|
||||||
|
await expect(page.locator("#left-pane .quick-search input"))
|
||||||
|
.toHaveAttribute("placeholder", "Quick search");
|
||||||
|
});
|
||||||
|
|
||||||
test("Displays translations in Settings", async ({ page }) => {
|
test("Displays translations in Settings", async ({ page }) => {
|
||||||
const app = new App(page);
|
const app = new App(page);
|
||||||
await app.goto();
|
await app.goto();
|
||||||
@ -8,8 +16,8 @@ test("Displays translations in Settings", async ({ page }) => {
|
|||||||
await app.goToSettings();
|
await app.goToSettings();
|
||||||
await app.noteTree.getByText("Appearance").click();
|
await app.noteTree.getByText("Appearance").click();
|
||||||
|
|
||||||
expect(app.currentNoteSplit).toContainText("Localization");
|
await expect(app.currentNoteSplit).toContainText("Localization");
|
||||||
expect(app.currentNoteSplit).toContainText("Language");
|
await expect(app.currentNoteSplit).toContainText("Language");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("User can change language from settings", async ({ page }) => {
|
test("User can change language from settings", async ({ page }) => {
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
import test, { expect } from "@playwright/test";
|
import test, { expect } from "@playwright/test";
|
||||||
|
|
||||||
test("Restores language on start-up on desktop", async ({ page, context }) => {
|
|
||||||
await page.goto("http://localhost:8082");
|
|
||||||
await expect(page.locator("#launcher-pane").first()).toContainText("Open New Window");
|
|
||||||
});
|
|
||||||
|
|
||||||
test("Restores language on start-up on mobile", async ({ page, context }) => {
|
test("Restores language on start-up on mobile", async ({ page, context }) => {
|
||||||
await context.addCookies([
|
await context.addCookies([
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user