diff --git a/test/e2e/tests/edit.spec.js b/test/e2e/tests/edit.spec.js index cc8639f9..6fb6cd39 100644 --- a/test/e2e/tests/edit.spec.js +++ b/test/e2e/tests/edit.spec.js @@ -130,13 +130,12 @@ test('Add code mark', async ({ page }, workerInfo) => { test.setTimeout(30000); const url = getTestPageURL('edit5', workerInfo); await page.goto(url); - await page.waitForTimeout(3000); const proseMirror = page.locator('div.ProseMirror'); await proseMirror.waitFor(); await expect(proseMirror).toBeVisible(); await expect(proseMirror).toHaveAttribute('contenteditable', 'true'); await proseMirror.fill('This is a line that will contain a code mark.'); - await page.waitForTimeout(1000); + await expect(proseMirror).toContainText('This is a line that will contain a code mark.'); // Forward for (let i = 0; i < 10; i += 1) { @@ -148,7 +147,6 @@ test('Add code mark', async ({ page }, workerInfo) => { } await page.keyboard.press('`'); // leave time for the code mark to be processed - await page.waitForTimeout(1000); let codeElement = proseMirror.locator('code'); await codeElement.waitFor(); await expect(codeElement).toContainText('code'); @@ -164,7 +162,6 @@ test('Add code mark', async ({ page }, workerInfo) => { await page.keyboard.press('ArrowLeft'); } await page.keyboard.press('`'); - await page.waitForTimeout(1000); codeElement = proseMirror.locator('code'); await codeElement.waitFor(); await expect(codeElement).toContainText('code'); @@ -179,6 +176,5 @@ test('Add code mark', async ({ page }, workerInfo) => { await page.keyboard.press('ArrowRight'); } await page.keyboard.press('`'); - await page.waitForTimeout(1000); await expect(proseMirror).toContainText('This is a line that will contain `a code mark`.'); });