Browse Source

DONE: create 10 projects

Jose Olarte III 3 months ago
parent
commit
c4a8026276
  1. 8
      test-playwright/25-create-project-x10.spec.ts

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

@ -19,7 +19,8 @@ function createUniqueStringsArray(count) {
return stringsArray;
}
test('Create 10 new projects, then search for them', async ({ page }) => {
test('Create 10 new projects', async ({ page }) => {
test.slow(); // Extend the test timeout
const projectCount = 10;
// Standard texts
@ -44,8 +45,8 @@ test('Create 10 new projects, then search for them', async ({ page }) => {
// Import user 00
await importUser(page, '00');
// Pause for 5 seconds
await page.waitForTimeout(5000); // I have to wait, otherwise the (+) button to add a new project doesn't appear
// Pause a bit
await page.waitForTimeout(3000); // I have to wait, otherwise the (+) button to add a new project doesn't appear
// Create new projects
for (let i = 0; i < projectCount; i++) {
@ -58,6 +59,7 @@ test('Create 10 new projects, then search for them', async ({ page }) => {
await page.getByPlaceholder('Start Date').fill('2025-12-01');
await page.getByPlaceholder('Start Time').fill('12:00');
await page.getByRole('button', { name: 'Save Project' }).click();
await page.waitForTimeout(1000); // Compensate for delay in loading Idea Name heading
// Check texts
await expect(page.locator('h2')).toContainText(finalTitles[i]);

Loading…
Cancel
Save