Browse Source

fix(playwright): re-route after affirming onboarding dialog

After calling OnboardingDialog from ProjectsView, route back to projects page again

The onboarding dialog was designed to route back to HomeView when called from ProjectsView. The tests need to be updated to account for this intended behavior.
pull/188/head
Jose Olarte III 1 week ago
parent
commit
6fb4ceab81
  1. 2
      test-playwright/20-create-project.spec.ts
  2. 2
      test-playwright/25-create-project-x10.spec.ts

2
test-playwright/20-create-project.spec.ts

@ -117,6 +117,8 @@ test('Create new project, then search for it', async ({ page }) => {
// No onboarding dialog present, continue // No onboarding dialog present, continue
console.log('No onboarding dialog found on projects page'); console.log('No onboarding dialog found on projects page');
} }
// Route back to projects page again, because the onboarding dialog was designed to route to HomeView when called from ProjectsView
await page.goto('./projects');
await page.locator('button > svg.fa-plus').click(); await page.locator('button > svg.fa-plus').click();
await page.getByPlaceholder('Idea Name').fill(finalTitle); await page.getByPlaceholder('Idea Name').fill(finalTitle);
await page.getByPlaceholder('Description').fill(finalDescription); await page.getByPlaceholder('Description').fill(finalDescription);

2
test-playwright/25-create-project-x10.spec.ts

@ -137,6 +137,8 @@ test('Create 10 new projects', async ({ page }) => {
console.log('No onboarding dialog found on projects page'); console.log('No onboarding dialog found on projects page');
} }
} }
// Route back to projects page again, because the onboarding dialog was designed to route to HomeView when called from ProjectsView
await page.goto('./projects');
await page.locator('button > svg.fa-plus').click(); await page.locator('button > svg.fa-plus').click();
await page.getByPlaceholder('Idea Name').fill(finalTitles[i]); // Add random suffix await page.getByPlaceholder('Idea Name').fill(finalTitles[i]); // Add random suffix
await page.getByPlaceholder('Description').fill(finalDescriptions[i]); await page.getByPlaceholder('Description').fill(finalDescriptions[i]);

Loading…
Cancel
Save