Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate list block test to Playwright #41555

Merged
merged 27 commits into from
Jul 5, 2022
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
replage $eval
  • Loading branch information
torounit committed Jul 5, 2022
commit 1c7ba1be25e361b992e2e1e946d742a8e861ff42
10 changes: 2 additions & 8 deletions test/e2e/specs/editor/blocks/list.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -850,10 +850,7 @@ test.describe( 'List', () => {
await page.keyboard.type( '3' );
await editor.clickBlockToolbarButton( 'Ordered' );

const content = await page.$eval(
'.wp-block-list',
( el ) => el.innerHTML
);
const content = await page.locator( '.wp-block-list' ).innerHTML();
expect( content ).toBe( `<li>1</li><li>2</li><li>3</li>` );
} );

Expand All @@ -869,10 +866,7 @@ test.describe( 'List', () => {
await page.keyboard.type( 'c' );
await editor.clickBlockToolbarButton( 'Unordered' );

const content = await page.$eval(
'.wp-block-list',
( el ) => el.innerHTML
);
const content = await page.locator( '.wp-block-list' ).innerHTML();
expect( content ).toBe( `<li>a</li><li>b</li><li>c</li>` );
} );
} );