Files
penpot/frontend/playwright/ui/specs/dashboard-teams.spec.js
Belén Albeza 45af469a11
Some checks failed
Commit Message Check / Check Commit Message (push) Has been cancelled
🐛 Fix invite selection copy
* 🐛 Fix selected invitations copy not being localized/pluralized

*  Add integration test for team invites + fixes unaccessible dom
2025-10-23 12:04:34 +02:00

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();
});