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