mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
Some checks failed
Commit Message Check / Check Commit Message (push) Has been cancelled
* 🐛 Fix selected invitations copy not being localized/pluralized * ✨ Add integration test for team invites + fixes unaccessible dom
32 lines
1012 B
JavaScript
32 lines
1012 B
JavaScript
import { test, expect } from "@playwright/test";
|
|
import DashboardPage from "../pages/DashboardPage";
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
await DashboardPage.init(page);
|
|
await DashboardPage.mockRPC(
|
|
page,
|
|
"get-profile",
|
|
"logged-in-user/get-profile-logged-in-no-onboarding.json",
|
|
);
|
|
});
|
|
|
|
test("BUG 12359 - Selected invitations count is not pluralized", async ({
|
|
page,
|
|
}) => {
|
|
const dashboardPage = new DashboardPage(page);
|
|
await dashboardPage.setupDashboardFull();
|
|
await dashboardPage.setupTeamInvitations();
|
|
|
|
await dashboardPage.goToSecondTeamInvitationsSection();
|
|
|
|
await expect(page.getByText("test1@mail.com")).toBeVisible();
|
|
|
|
// NOTE: we cannot use check() or getByLabel() because the checkbox
|
|
// is hidden inside the label.
|
|
await page.getByText("test1@mail.com").click();
|
|
await expect(page.getByText("1 invitation selected")).toBeVisible();
|
|
|
|
await page.getByText("test2@mail.com").check();
|
|
await expect(page.getByText("2 invitations selected")).toBeVisible();
|
|
});
|