mirror of
https://github.com/penpot/penpot.git
synced 2025-05-28 21:06:11 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
c41f86f0a4
39 changed files with 682 additions and 205 deletions
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"~#set": [
|
||||
{
|
||||
"~:team-id": "~uc7ce0794-0992-8105-8004-38e630f40f6d",
|
||||
"~:name": "Lorem Ipsum",
|
||||
"~:revn": 2,
|
||||
"~:modified-at": "~m1739356261950",
|
||||
"~:vern": 0,
|
||||
"~:id": "~u69b52fcf-7de0-81cd-8005-b9b180a0bfb5",
|
||||
"~:thumbnail-id": "~u55bb9e08-6eed-4a64-a94d-2bcce7006e79",
|
||||
"~:is-shared": true,
|
||||
"~:project-id": "~u1ad2931c-eb80-8098-8005-b86c1d9d26c2",
|
||||
"~:created-at": "~m1739356217030",
|
||||
"~:library-summary": {
|
||||
"~:components": {
|
||||
"~:count": 0,
|
||||
"~:sample": []
|
||||
},
|
||||
"~:media": {
|
||||
"~:count": 0,
|
||||
"~:sample": []
|
||||
},
|
||||
"~:colors": {
|
||||
"~:count": 1,
|
||||
"~:sample": [
|
||||
{
|
||||
"~:path": "",
|
||||
"~:color": "#0087ff",
|
||||
"~:name": "#0087ff",
|
||||
"~:modified-at": "~m1739356244863",
|
||||
"~:opacity": 1,
|
||||
"~:id": "~u0449ccff-62fe-805c-8005-b9b194b094dd"
|
||||
}
|
||||
]
|
||||
},
|
||||
"~:typographies": {
|
||||
"~:count": 0,
|
||||
"~:sample": []
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -72,7 +72,7 @@ export class DashboardPage extends BaseWebSocketPage {
|
|||
|
||||
this.draftsLink = this.sidebar.getByText("Drafts");
|
||||
this.fontsLink = this.sidebar.getByText("Fonts");
|
||||
this.libsLink = this.sidebar.getByText("Libraries");
|
||||
this.librariesLink = this.sidebar.getByText("Libraries");
|
||||
|
||||
this.searchButton = page.getByRole("button", { name: "dashboard-search" });
|
||||
this.searchInput = page.getByPlaceholder("Search…");
|
||||
|
@ -281,6 +281,13 @@ export class DashboardPage extends BaseWebSocketPage {
|
|||
|
||||
await this.userProfileOption.click();
|
||||
}
|
||||
|
||||
async goToLibraries() {
|
||||
await this.page.goto(
|
||||
`#/dashboard/libraries?team-id=${DashboardPage.anyTeamId}`,
|
||||
);
|
||||
await expect(this.mainHeading).toHaveText("Libraries");
|
||||
}
|
||||
}
|
||||
|
||||
export default DashboardPage;
|
||||
|
|
33
frontend/playwright/ui/specs/dashboard-libraries.spec.js
Normal file
33
frontend/playwright/ui/specs/dashboard-libraries.spec.js
Normal 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();
|
||||
});
|
|
@ -47,7 +47,7 @@ test("User goes to an empty libraries page", async ({ page }) => {
|
|||
await dashboardPage.setupLibrariesEmpty();
|
||||
|
||||
await dashboardPage.goToDashboard();
|
||||
await dashboardPage.libsLink.click();
|
||||
await dashboardPage.librariesLink.click();
|
||||
|
||||
await expect(dashboardPage.mainHeading).toHaveText("Libraries");
|
||||
await expect(dashboardPage.page).toHaveScreenshot();
|
||||
|
@ -100,7 +100,7 @@ test("User goes to a full library page", async ({ page }) => {
|
|||
await dashboardPage.setupDashboardFull();
|
||||
|
||||
await dashboardPage.goToDashboard();
|
||||
await dashboardPage.libsLink.click();
|
||||
await dashboardPage.librariesLink.click();
|
||||
|
||||
await expect(dashboardPage.mainHeading).toHaveText("Libraries");
|
||||
await expect(dashboardPage.page).toHaveScreenshot();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue