diff --git a/test/e2e/tests/auth.setup.js b/test/e2e/tests/auth.setup.js index 1bce62366..f994b2c65 100644 --- a/test/e2e/tests/auth.setup.js +++ b/test/e2e/tests/auth.setup.js @@ -73,9 +73,6 @@ setup('Set up authentication', async ({ page }) => { await signInButton.click(); - // The IMS sign in page needs a bit of time to load - await page.waitForTimeout(3000); - const emailInput = page.getByLabel('Email address'); await emailInput.waitFor(); await emailInput.fill('da-test@adobetest.com'); diff --git a/test/e2e/tests/authenticated/acl_browse.spec.js b/test/e2e/tests/authenticated/acl_browse.spec.js index 7c0aec5aa..6229b54f5 100644 --- a/test/e2e/tests/authenticated/acl_browse.spec.js +++ b/test/e2e/tests/authenticated/acl_browse.spec.js @@ -26,7 +26,6 @@ test('Read-only directory', async ({ page }) => { await tabBackward(page); await page.keyboard.press(' '); - await page.waitForTimeout(500); const tickbox = page.locator('da-list-item').filter({ hasText: 'onlyread-doc' }).locator('label'); await expect(tickbox).toBeChecked(); @@ -70,7 +69,6 @@ test('Read-write directory', async ({ browser, page }, workerInfo) => { await tabBackward(page); await page.keyboard.press(' '); - await page.waitForTimeout(500); const tickbox = page.locator('da-list-item').filter({ hasText: pageName }).locator('label'); await expect(tickbox).toBeChecked(); @@ -78,13 +76,8 @@ test('Read-write directory', async ({ browser, page }, workerInfo) => { // There are 2 delete buttons, one on the Browse panel and another on the Search one // select the visible one. await page.locator('button.delete-button').filter({ visible: true }).click(); - - await page.waitForTimeout(1000); - await page.locator('sl-button.negative').filter({ visible: true }).click(); - await page.waitForTimeout(1000); - await expect(page.locator(`a[href="/edit#/da-testautomation/acltest/testdocs/subdir/subdir1/${pageName}"]`)).not.toBeVisible(); }); @@ -98,7 +91,6 @@ test('Readonly directory with writeable document', async ({ page }) => { await tabBackward(page); await page.keyboard.press(' '); - await page.waitForTimeout(500); // Check that the expected delete button is there (but don't click it) await expect(page.locator('button.delete-button').filter({ visible: true })).toBeVisible(); diff --git a/test/e2e/tests/authenticated/acl_versions.spec.js b/test/e2e/tests/authenticated/acl_versions.spec.js index 8c4692d60..3ee16a000 100644 --- a/test/e2e/tests/authenticated/acl_versions.spec.js +++ b/test/e2e/tests/authenticated/acl_versions.spec.js @@ -26,7 +26,6 @@ test('Can read versions of read-write document', async ({ page }) => { // find v1 and check it — the click expands the version entry to reveal its // button; WebKit needs a beat for the expansion to start processing. await page.getByText('v1').click(); - await page.waitForTimeout(500); const v1Button = page.locator('li').filter({ hasText: 'v1' }).getByRole('button'); await expect(v1Button).toBeVisible(); await v1Button.click(); @@ -52,7 +51,6 @@ test('Cannot read versions of read-only document', async ({ page }) => { // find v1 and check it — the click expands the version entry to reveal its // button; WebKit needs a beat for the expansion to start processing. await page.getByText('version 1').click(); - await page.waitForTimeout(500); const v1Button = page.locator('li').filter({ hasText: 'version 1' }).getByRole('button'); await expect(v1Button).toBeVisible(); await v1Button.click(); diff --git a/test/e2e/tests/authenticated/collab.spec.js b/test/e2e/tests/authenticated/collab.spec.js index fdb9fcff8..86eba9681 100644 --- a/test/e2e/tests/authenticated/collab.spec.js +++ b/test/e2e/tests/authenticated/collab.spec.js @@ -97,9 +97,6 @@ test('Collab cursors in multiple editors', async ({ browser, page, browserName } await page2.mouse.click(editBox.x + 10, editBox.y + 10); await page2.keyboard.type('From user 2'); - // Give the collab cursors some cycles to appear - await page.waitForTimeout(3000); - // Wait for page2's edit to reach page1 — confirms YJS sync before checking collab state await expect(page.locator('div.ProseMirror')).toContainText('From user 2'); diff --git a/test/e2e/tests/copy_rename.spec.js b/test/e2e/tests/copy_rename.spec.js index 622ad82c5..a02d2591f 100644 --- a/test/e2e/tests/copy_rename.spec.js +++ b/test/e2e/tests/copy_rename.spec.js @@ -53,7 +53,6 @@ const link = await page.getByRole('link', { name: orgPageName }); await page.locator('button.da-version-btn', { hasText: 'Create' }).click(); await page.locator('input.da-version-new-input').fill('myver'); await page.locator('input.da-version-new-input').press('Enter'); - await page.waitForTimeout(3000); await expect(page.getByText('myver', { exact: false })).toBeVisible(); // Add some more text @@ -113,7 +112,6 @@ const link = await page.getByRole('link', { name: orgPageName }); await expect(page.locator('div.ProseMirror')).toContainText('After versioned'); await page.getByRole('button', { name: 'Versions' }).click(); await page.getByText('myver', { exact: false }).click(); - await page.waitForTimeout(500); const myverButton = page.locator('li').filter({ hasText: 'myver' }).getByRole('button'); await expect(myverButton).toBeVisible(); await myverButton.click(); diff --git a/test/e2e/tests/delete.spec.js b/test/e2e/tests/delete.spec.js index 6a48982c7..a32032f49 100644 --- a/test/e2e/tests/delete.spec.js +++ b/test/e2e/tests/delete.spec.js @@ -93,9 +93,6 @@ test('Empty out open editors on deleted documents', async ({ browser, page }, wo await dismissAlertBanner(list); await list.locator('button.delete-button').filter({ visible: true }).click(); - // Give the modal a chance to open - await list.waitForTimeout(1000); - // Hit the delete confirmation button await list.locator('sl-button.negative').filter({ visible: true }).click(); diff --git a/test/e2e/tests/edit.spec.js b/test/e2e/tests/edit.spec.js index 8af6157ff..743425bd5 100644 --- a/test/e2e/tests/edit.spec.js +++ b/test/e2e/tests/edit.spec.js @@ -21,7 +21,6 @@ test('Update Document', async ({ browser, page }, workerInfo) => { const url = getTestPageURL('edit1', workerInfo); await page.goto(url); - await page.waitForTimeout(2000); await page.getByText('Create document', { exact: true }).click(); await expect(page.locator('div.ProseMirror')).toBeVisible(); await expect(page.locator('div.ProseMirror')).toHaveAttribute('contenteditable', 'true'); diff --git a/test/e2e/tests/sheet.spec.js b/test/e2e/tests/sheet.spec.js index de7123513..a5167d867 100644 --- a/test/e2e/tests/sheet.spec.js +++ b/test/e2e/tests/sheet.spec.js @@ -19,10 +19,10 @@ test('New sheet', async ({ page }, workerInfo) => { await page.locator('input').fill('key'); // Enter text into second cell + const saved = waitForSave(page); await page.locator('[data-x="0"][data-y="1"]').dblclick(); await page.locator('td input').fill(enteredText); - - await page.waitForTimeout(3000); + await saved; await page.close(); }); diff --git a/test/e2e/tests/versions.spec.js b/test/e2e/tests/versions.spec.js index 3d91e5c76..f3d7c6d63 100644 --- a/test/e2e/tests/versions.spec.js +++ b/test/e2e/tests/versions.spec.js @@ -73,10 +73,10 @@ test('Create Version and Restore from it', async ({ page }, workerInfo) => { await expect(audit).toContainText(expectedUser); } - // Select 'ver 1' and restore it — the click expands the version entry; - // WebKit needs a beat for the expansion to start processing. + // Select 'ver 1' and restore it — the click expands the version entry. + // The following assertion's built-in polling covers WebKit needing a beat + // for the expansion to start processing. await page.getByText('ver 1', { exact: false }).click(); - await page.waitForTimeout(500); const ver1Button = page.locator('li').filter({ hasText: 'ver 1' }).getByRole('button'); await expect(ver1Button).toBeVisible(); await ver1Button.click();