mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
✨ Avoid using unneeded test ids in dashboard POM
This commit is contained in:
@@ -3,11 +3,7 @@ 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",
|
||||
);
|
||||
await DashboardPage.mockRPC(page, "get-profile", "logged-in-user/get-profile-logged-in-no-onboarding.json");
|
||||
});
|
||||
|
||||
test("Dashboad page has title ", async ({ page }) => {
|
||||
@@ -16,7 +12,7 @@ test("Dashboad page has title ", async ({ page }) => {
|
||||
await dashboardPage.goToDashboard();
|
||||
|
||||
await expect(dashboardPage.page).toHaveURL(/dashboard/);
|
||||
await expect(dashboardPage.titleLabel).toBeVisible();
|
||||
await expect(dashboardPage.projectsHeading).toBeVisible();
|
||||
});
|
||||
|
||||
test("User can create a new project", async ({ page }) => {
|
||||
@@ -24,7 +20,7 @@ test("User can create a new project", async ({ page }) => {
|
||||
await dashboardPage.setupNewProject();
|
||||
|
||||
await dashboardPage.goToDashboard();
|
||||
await dashboardPage.addProjectBtn.click();
|
||||
await dashboardPage.addProjectButton.click();
|
||||
|
||||
await expect(dashboardPage.projectName).toBeVisible();
|
||||
});
|
||||
@@ -34,9 +30,9 @@ test("User goes to draft page", async ({ page }) => {
|
||||
await dashboardPage.setupDraftsEmpty();
|
||||
|
||||
await dashboardPage.goToDashboard();
|
||||
await dashboardPage.draftLink.click();
|
||||
await dashboardPage.draftsLink.click();
|
||||
|
||||
await expect(dashboardPage.draftTitle).toBeVisible();
|
||||
await expect(dashboardPage.draftsTitle).toBeVisible();
|
||||
});
|
||||
|
||||
test("User loads the draft page", async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user