🐛(e2e) fix flaky tests
3 tests were flags are flaky or bringing flakiness. We improved them.
This commit is contained in:
@@ -233,7 +233,7 @@ test.describe('Doc Editor', () => {
|
|||||||
test.skip(browserName === 'webkit', 'This test is very flaky with webkit');
|
test.skip(browserName === 'webkit', 'This test is very flaky with webkit');
|
||||||
|
|
||||||
// Check the first doc
|
// Check the first doc
|
||||||
const doc = await goToGridDoc(page);
|
const [doc] = await createDoc(page, 'doc-quit-1', browserName, 1);
|
||||||
await expect(page.locator('h2').getByText(doc)).toBeVisible();
|
await expect(page.locator('h2').getByText(doc)).toBeVisible();
|
||||||
|
|
||||||
const editor = page.locator('.ProseMirror');
|
const editor = page.locator('.ProseMirror');
|
||||||
@@ -272,8 +272,8 @@ test.describe('Doc Editor', () => {
|
|||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('it adds an image to the doc editor', async ({ page }) => {
|
test('it adds an image to the doc editor', async ({ page, browserName }) => {
|
||||||
await goToGridDoc(page);
|
await createDoc(page, 'doc-image', browserName, 1);
|
||||||
|
|
||||||
const fileChooserPromise = page.waitForEvent('filechooser');
|
const fileChooserPromise = page.waitForEvent('filechooser');
|
||||||
|
|
||||||
|
|||||||
@@ -120,13 +120,14 @@ test.describe('Doc Header', () => {
|
|||||||
|
|
||||||
await editor.locator('h1').fill('');
|
await editor.locator('h1').fill('');
|
||||||
|
|
||||||
|
// eslint-disable-next-line playwright/no-wait-for-timeout
|
||||||
|
await page.waitForTimeout(500);
|
||||||
|
|
||||||
await docHeader
|
await docHeader
|
||||||
.getByRole('heading', { name: 'Top World', level: 2 })
|
.getByRole('heading', { name: 'Top World', level: 2 })
|
||||||
.fill(' ');
|
.fill(' ');
|
||||||
|
|
||||||
await page.getByText('Created at').click({
|
await page.getByText('Created at').click();
|
||||||
delay: 200,
|
|
||||||
});
|
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
docHeader.getByRole('heading', { name: 'Untitled document', level: 2 }),
|
docHeader.getByRole('heading', { name: 'Untitled document', level: 2 }),
|
||||||
|
|||||||
Reference in New Issue
Block a user