Skip to content

Commit

Permalink
test(e2e): update timeouts for opening popovers (#6871)
Browse files Browse the repository at this point in the history
* test(e2e): update timeouts for opening popovers

* test(e2e): update document actions

* test(e2e): update timeouts

* test(e2e): update timeouts

* test: update timeout on containtext

* test: update timeout on containtext

* test: update timeout on reference test
  • Loading branch information
RitaDias authored Jun 11, 2024
1 parent 5e505ac commit 1befff1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/e2e/tests/document-actions/discardChanges.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test(`is possible to discard changes if a changed document has a published versi
await titleInput.fill('This is a book')

publishButton.click()
await expect(paneFooter).toContainText('Published just now')
await expect(paneFooter).toContainText('Published just now', {timeout: 50000})

await titleInput.fill('This is not a book')

Expand All @@ -58,7 +58,7 @@ test(`displays the published document state after discarding changes`, async ({
await titleInput.fill('This is a book')

publishButton.click()
await expect(paneFooter).toContainText('Published just now')
await expect(paneFooter).toContainText('Published just now', {timeout: 50000})

// Change the title.
await titleInput.fill('This is not a book')
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/tests/inputs/reference.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ withDefaultClient((context) => {
await page.locator('#author-menuButton').click()
await page.getByRole('menuitem').getByText('Replace').click()
await referenceInput.getByLabel('Open').click()
await expect(authorListbox).toBeVisible()
await expect(authorListbox).toBeVisible({timeout: 50000})

// Select the next document in the list.
await page.keyboard.press('ArrowDown')
Expand Down
7 changes: 5 additions & 2 deletions test/e2e/tests/pte/Toolbar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test.describe('Portable Text Input - Open Block Style Select', () => {
})

test('on a simple editor', async ({page}) => {
await pteInput.getByTestId('block-style-select').click()
await pteInput.getByTestId('block-style-select').click({timeout: 15000})

expect(await page.locator('[data-ui="MenuButton__popover"]')).toBeVisible()
})
Expand Down Expand Up @@ -63,7 +63,10 @@ test.describe('Portable Text Input - Open Block Style Select', () => {
// click the block style select
await page.locator('[data-testid="block-style-select"]').nth(1).click()

await page.waitForSelector('[data-ui="MenuButton__popover"]', {state: 'attached'})
await page.waitForSelector('[data-ui="MenuButton__popover"]', {
state: 'attached',
timeout: 15000,
})

await expect(await page.locator('[data-ui="MenuButton__popover"]')).toBeVisible()
})
Expand Down

0 comments on commit 1befff1

Please sign in to comment.