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 Cover Block tests to Playwright #45784

Merged
merged 17 commits into from
May 15, 2023
Merged
Changes from 1 commit
Commits
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
- check the src repeatedly to contain the fileBasename instead.
  • Loading branch information
worldomonation committed May 10, 2023
commit aadc65db9d5009e4b86d011baa31e6fcb95fda26
8 changes: 1 addition & 7 deletions test/e2e/specs/editor/blocks/cover.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,8 @@ test.describe( 'Cover', () => {
// beginning with `blob`.
await expect( async () => {
const src = await coverBlock.locator( 'img' ).getAttribute( 'src' );
expect( src.startsWith( 'http' ) ).toBe( true );
expect( src.includes( fileBasename ) ).toBe( true );
} ).toPass();

const backgroundImageURL = await coverBlock
.locator( 'img' )
.getAttribute( 'src' );

expect( backgroundImageURL ).toContain( fileBasename );
} );

test( 'dims background image down by 50% by default', async ( {
Expand Down