From a8fdbfc671b4c3e9ca4d78f645ed1c036ad6e571 Mon Sep 17 00:00:00 2001 From: David Bosschaert Date: Wed, 29 May 2024 08:19:27 +0100 Subject: [PATCH] Remove a bunch of timeouts that are not needed any more --- test/e2e/tests/edit.spec.js | 11 ++--------- test/e2e/tests/versions.spec.js | 2 -- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/test/e2e/tests/edit.spec.js b/test/e2e/tests/edit.spec.js index 2b0598b0..078a8479 100644 --- a/test/e2e/tests/edit.spec.js +++ b/test/e2e/tests/edit.spec.js @@ -18,14 +18,12 @@ test('Update Document', async ({ browser, page }, workerInfo) => { const url = getTestPageURL('edit1', workerInfo); await page.goto(url); - await page.waitForTimeout(3000); await expect(page.locator('div.ProseMirror')).toBeVisible(); - await page.waitForTimeout(1000); const enteredText = `[${workerInfo.project.name}] Edited by test ${new Date()}`; await page.locator('div.ProseMirror').fill(enteredText); - await page.waitForTimeout(3000); + await page.waitForTimeout(1000); await page.close(); const newPage = await browser.newPage(); @@ -46,10 +44,9 @@ test('Create Delete Document', async ({ browser, page }, workerInfo) => { await page.locator('input.da-actions-input').fill(pageName); await page.locator('button:text("Create document")').click(); - await page.waitForTimeout(3000); await expect(page.locator('div.ProseMirror')).toBeVisible(); - await page.waitForTimeout(1000); await page.locator('div.ProseMirror').fill('testcontent'); + await page.waitForTimeout(1000); const newPage = await browser.newPage(); await newPage.goto(`${ENV}/#/da-sites/da-status/tests`); @@ -79,9 +76,7 @@ test('Change document by switching anchors', async ({ page }, workerInfo) => { const urlB = `${url}B`; await page.goto(urlA); - await page.waitForTimeout(3000); await expect(page.locator('div.ProseMirror')).toBeVisible(); - await page.waitForTimeout(1000); await page.locator('div.ProseMirror').fill('before table'); await page.getByText('Block', { exact: true }).click(); @@ -100,9 +95,7 @@ test('Change document by switching anchors', async ({ page }, workerInfo) => { await page.waitForTimeout(1000); await page.goto(urlB); - await page.waitForTimeout(3000); await expect(page.locator('div.ProseMirror')).toBeVisible(); - await page.waitForTimeout(1000); await page.locator('div.ProseMirror').fill('page B'); await page.waitForTimeout(1000); diff --git a/test/e2e/tests/versions.spec.js b/test/e2e/tests/versions.spec.js index 28d866c5..fe5a9c55 100644 --- a/test/e2e/tests/versions.spec.js +++ b/test/e2e/tests/versions.spec.js @@ -18,9 +18,7 @@ test('Create Version and Restore from it', async ({ page }, workerInfo) => { test.setTimeout(30000); await page.goto(getTestPageURL('versions', workerInfo)); - await page.waitForTimeout(3000); await expect(page.locator('div.ProseMirror')).toBeVisible(); - await page.waitForTimeout(1000); // Enter some initial text onto the page await page.locator('div.ProseMirror').fill('Initial version');