Add visual testing to dashboard

This commit is contained in:
Eva Marco 2024-05-28 10:29:52 +02:00
parent 4e6c1857dd
commit 4e770fd326
26 changed files with 976 additions and 11 deletions

View file

@ -13,7 +13,7 @@ test.beforeEach(async ({ page }) => {
test("Dashboad page has title ", async ({ page }) => {
const dashboardPage = new DashboardPage(page);
await dashboardPage.goToWorkspace();
await dashboardPage.goToDashboard();
await expect(dashboardPage.page).toHaveURL(/dashboard/);
await expect(dashboardPage.titleLabel).toBeVisible();
@ -23,7 +23,7 @@ test("User can create a new project", async ({ page }) => {
const dashboardPage = new DashboardPage(page);
await dashboardPage.setupNewProject();
await dashboardPage.goToWorkspace();
await dashboardPage.goToDashboard();
await dashboardPage.addProjectBtn.click();
await expect(dashboardPage.projectName).toBeVisible();
@ -33,7 +33,7 @@ test("User goes to draft page", async ({ page }) => {
const dashboardPage = new DashboardPage(page);
await dashboardPage.setupDraftsEmpty();
await dashboardPage.goToWorkspace();
await dashboardPage.goToDashboard();
await dashboardPage.draftLink.click();
await expect(dashboardPage.draftTitle).toBeVisible();

View file

@ -12,7 +12,7 @@ test("User can complete the onboarding", async ({ page }) => {
const dashboardPage = new DashboardPage(page);
const onboardingPage = new OnboardingPage(page);
await dashboardPage.goToWorkspace();
await dashboardPage.goToDashboard();
await expect(page.getByRole("heading", { name: "Help us get to know you" })).toBeVisible();
await onboardingPage.fillOnboardingInputsStep1();