Skip to content

Commit

Permalink
Remove unrelated changes
Browse files Browse the repository at this point in the history
These can be fixed in another PR
  • Loading branch information
mleray committed Dec 3, 2024
1 parent f50e625 commit 4e1ad12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 7 additions & 3 deletions tests/e2e/tools/lib/editor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Locator, Page} from '@playwright/test'; // eslint-disable-line no-unused-vars
import {expect, Locator, Page} from '@playwright/test'; // eslint-disable-line no-unused-vars

/**
* @param {{Editor}} editor
Expand Down Expand Up @@ -77,8 +77,12 @@ async function removeAllPostTypes({editor}) {
const searchAndInsertBlock = async ({page}, blockName, namespace = '') => {
// We could also use the label "Add block",
// but this one works better when adding several blocks in a row.
await page.getByRole('button', {name: 'Toggle block inserter'}).click();
await page.getByLabel('Search for blocks and patterns').click();
const labelText = 'Toggle block inserter';
const addBlockButton = await page.locator(`button[aria-label="${labelText}"]`);
await expect(addBlockButton).toBeVisible();
await addBlockButton.click();

await page.getByPlaceholder('Search').click();
await page.keyboard.type(namespace !== '' ? namespace : blockName);

if (namespace !== '') {
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/tools/lib/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ async function createPostWithFeaturedImage({admin, editor}, params) {
}
await imageModal.getByRole('checkbox', {name: 'OCEANS-GP0STOM6C'}).click();
await imageModal.getByRole('button', {name: 'Set featured image'}).click();
await editor.canvas.waitForSelector('.editor-post-featured-image__preview-image');

return newPost;
}
Expand Down

0 comments on commit 4e1ad12

Please sign in to comment.