Skip to content

Commit

Permalink
Fixes Playwright tests
Browse files Browse the repository at this point in the history
  • Loading branch information
allanlasser committed Nov 27, 2023
1 parent 4ad8de1 commit 3804405
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions src/pages/app/AccountNavigation/LanguageMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@
{#if langs.length > 1}
<!-- Language Menu -->
<Dropdown id="language" position="right">
<MenuTitle
slot="title"
label={currentLang[0] ?? $_("authSection.language.title")}
>
<MenuTitle slot="title" label={$_("authSection.language.title")}>
<div class="icon" slot="icon"><Globe16 /></div>
</MenuTitle>
<Menu>
Expand Down
10 changes: 5 additions & 5 deletions tests/anonymous/manager/app.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ test.describe("manager tests", () => {
await page.goto("/app");

// help
await page.getByText("Help ▼").click();
await page.getByText("Help", { exact: true }).dispatchEvent("click");
await expect(page.getByRole("button", { name: "FAQ" })).toBeVisible();

// close the menu
await page.locator(".shim").click();
await page.locator(".overlay").click();

// language
await page.getByText("Language ▼").click();
await expect(page.getByRole("button", { name: "English ✓" })).toBeVisible();
await page.getByText("Language", { exact: true }).dispatchEvent("click");
await expect(page.getByRole("button", { name: "Español" })).toBeVisible();

await page.locator(".shim").click();
await page.locator(".overlay").click();
});
});
2 changes: 1 addition & 1 deletion tests/anonymous/pages/home.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test("basic homepage test", async ({ page }) => {
await page.getByRole("banner").getByRole("link").first().click();

// and back
await page.getByRole("link", { name: "Home" }).click();
await page.goBack();

await expect(page).toHaveTitle("Home | DocumentCloud");
});

0 comments on commit 3804405

Please sign in to comment.