mirror of
https://github.com/penpot/penpot.git
synced 2025-05-09 23:36:38 +02:00
✨ Avoid using unneeded test ids in dashboard POM
This commit is contained in:
parent
97a1b59861
commit
8f3452c0af
4 changed files with 35 additions and 31 deletions
|
@ -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 }) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue