🐛 Fix libraries context menu (#5854)

*  Add integration test for Bug #10421

* 🐛 Fix dashboard library item menu

*  Fixup integration test
This commit is contained in:
Belén Albeza 2025-02-14 14:34:54 +01:00 committed by GitHub
parent 8c81d48858
commit cad7d75590
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 197 additions and 85 deletions

View file

@ -0,0 +1,33 @@
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 10421 - Fix libraries context menu", async ({ page }) => {
const dashboardPage = new DashboardPage(page);
await dashboardPage.mockRPC(
"get-team-shared-files?team-id=*",
"dashboard/get-team-shared-files-10142.json",
);
await dashboardPage.mockRPC(
"get-all-projects",
"dashboard/get-all-projects.json",
);
await dashboardPage.goToLibraries();
const libraryItem = page.getByTitle(/Lorem Ipsum/);
await expect(libraryItem).toBeVisible();
await libraryItem.getByRole("button", { name: "Options" }).click();
await expect(page.getByText("Rename")).toBeVisible();
});