mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 12:06:37 +02:00
✨ Add basic dashboard pom and test
This commit is contained in:
parent
99371234dc
commit
d341cef406
9 changed files with 214 additions and 1 deletions
44
frontend/playwright/ui/specs/dashboard.spec.js
Normal file
44
frontend/playwright/ui/specs/dashboard.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);
|
||||
});
|
||||
|
||||
test("Dashboad page has title ", async ({ page }) => {
|
||||
const dashboardPage = new DashboardPage(page);
|
||||
|
||||
await dashboardPage.goToWorkspace();
|
||||
|
||||
await expect(dashboardPage.page).toHaveURL(/dashboard/);
|
||||
await expect(dashboardPage.titleLabel).toBeVisible();
|
||||
});
|
||||
|
||||
test("User can create a new project", async ({ page }) => {
|
||||
const dashboardPage = new DashboardPage(page);
|
||||
await dashboardPage.setupNewProject();
|
||||
|
||||
await dashboardPage.goToWorkspace();
|
||||
await dashboardPage.addProjectBtn.click();
|
||||
|
||||
await expect(dashboardPage.projectName).toBeVisible();
|
||||
});
|
||||
|
||||
test("User goes to draft page", async ({ page }) => {
|
||||
const dashboardPage = new DashboardPage(page);
|
||||
await dashboardPage.setupDraftsEmpty();
|
||||
|
||||
await dashboardPage.goToWorkspace();
|
||||
await dashboardPage.draftLink.click();
|
||||
|
||||
await expect(dashboardPage.draftTitle).toBeVisible();
|
||||
});
|
||||
|
||||
test("User loads the draft page", async ({ page }) => {
|
||||
const dashboardPage = new DashboardPage(page);
|
||||
await dashboardPage.setupDrafts();
|
||||
|
||||
await dashboardPage.goToDrafts();
|
||||
|
||||
await expect(dashboardPage.draftsFile).toBeVisible();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue