mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-26 13:35:16 +03:00
Fixed browser tests for unsaved changes (#20717)
no issue - takes into account that there is an additional editor in the DOM - which there is now.
This commit is contained in:
parent
c8ba9e8027
commit
61bf3ea57e
@ -78,7 +78,7 @@ const createPage = async (page, {title = 'Hello world', body = 'This is my post
|
|||||||
await page.locator('[data-test-editor-title-input]').fill(title);
|
await page.locator('[data-test-editor-title-input]').fill(title);
|
||||||
|
|
||||||
// wait for editor to be ready
|
// wait for editor to be ready
|
||||||
await expect(page.locator('[data-lexical-editor="true"]')).toBeVisible();
|
await expect(page.locator('[data-lexical-editor="true"]').first()).toBeVisible();
|
||||||
|
|
||||||
// Continue to the body by pressing enter
|
// Continue to the body by pressing enter
|
||||||
await page.keyboard.press('Enter');
|
await page.keyboard.press('Enter');
|
||||||
@ -304,7 +304,7 @@ test.describe('Publishing', () => {
|
|||||||
await expect(publishedHeader).toContainText(date.toFormat('LLL d, yyyy'));
|
await expect(publishedHeader).toContainText(date.toFormat('LLL d, yyyy'));
|
||||||
|
|
||||||
// add some extra text to the post
|
// add some extra text to the post
|
||||||
await adminPage.locator('[data-kg="editor"]').click();
|
await adminPage.locator('[data-kg="editor"]').first().click();
|
||||||
await adminPage.waitForTimeout(200); //
|
await adminPage.waitForTimeout(200); //
|
||||||
await adminPage.keyboard.type(' This is some updated text.');
|
await adminPage.keyboard.type(' This is some updated text.');
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ const createPostDraft = async (page, {title = 'Hello world', body = 'This is my
|
|||||||
await page.locator('[data-test-editor-title-input]').fill(title);
|
await page.locator('[data-test-editor-title-input]').fill(title);
|
||||||
|
|
||||||
// wait for editor to be ready
|
// wait for editor to be ready
|
||||||
await expect(page.locator('[data-lexical-editor="true"]')).toBeVisible();
|
await expect(page.locator('[data-lexical-editor="true"]').first()).toBeVisible();
|
||||||
|
|
||||||
// Continue to the body by pressing enter
|
// Continue to the body by pressing enter
|
||||||
await page.keyboard.press('Enter');
|
await page.keyboard.press('Enter');
|
||||||
|
Loading…
Reference in New Issue
Block a user