mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
✨ Show current penpot version
This commit is contained in:
44
frontend/playwright/ui/specs/profile-menu.spec.js
Normal file
44
frontend/playwright/ui/specs/profile-menu.spec.js
Normal file
@@ -0,0 +1,44 @@
|
||||
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("Navigate to penpot changelog from profile menu", async ({ page }) => {
|
||||
const dashboardPage = new DashboardPage(page);
|
||||
await dashboardPage.goToDashboard();
|
||||
|
||||
await dashboardPage.openProfileMenu();
|
||||
await dashboardPage.clickProfileMenuItem("About Penpot");
|
||||
|
||||
// Listen for the new page (tab) that opens when clicking "Penpot Changelog"
|
||||
const [newPage] = await Promise.all([
|
||||
page.context().waitForEvent("page"),
|
||||
dashboardPage.clickProfileMenuItem("Penpot Changelog"),
|
||||
]);
|
||||
|
||||
await newPage.waitForLoadState();
|
||||
await expect(newPage).toHaveURL("https://github.com/penpot/penpot/blob/develop/CHANGES.md");
|
||||
});
|
||||
|
||||
test("Opens release notes from current version from profile menu", async ({ page }) => {
|
||||
const dashboardPage = new DashboardPage(page);
|
||||
await dashboardPage.goToDashboard();
|
||||
|
||||
await dashboardPage.openProfileMenu();
|
||||
await dashboardPage.clickProfileMenuItem("About Penpot");
|
||||
await expect(
|
||||
page.getByText("Version 0.0.0 notes"),
|
||||
).toBeVisible();
|
||||
await dashboardPage.clickProfileMenuItem("Version");
|
||||
await expect(
|
||||
page.getByText("new in penpot?"),
|
||||
).toBeVisible();
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user