Skip to content

Commit

Permalink
updated test after rebasing trunk with latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieCabrera committed Oct 10, 2024
1 parent be1e548 commit 79aacfb
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions test/e2e/specs/site-editor/zoom-out.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test.describe( 'Zoom Out', () => {
// Check that the html is scaled.
await expect( html ).toHaveCSS(
'transform',
'matrix(0.75, 0, 0, 0.75, 0, 0)'
'matrix(0.67, 0, 0, 0.67, 0, 0)'
);
const iframeRect = await iframe.boundingBox();
const htmlRect = await html.boundingBox();
Expand All @@ -38,19 +38,5 @@ test.describe( 'Zoom Out', () => {

// Check that the zoomed out content has a frame around it.
expect( htmlRect.x ).toBeGreaterThan( iframeRect.x );

// We use border to separate the content from the frame so we need
// to check that that is present too, since boundingBox()
// includes the border to calculate the position.
const borderWidths = await html.evaluate( ( el ) => {
const styles = window.getComputedStyle( el );
return {
top: parseFloat( styles.borderTopWidth ),
right: parseFloat( styles.borderRightWidth ),
bottom: parseFloat( styles.borderBottomWidth ),
left: parseFloat( styles.borderLeftWidth ),
};
} );
expect( htmlRect.y + borderWidths.top ).toBeGreaterThan( iframeRect.y );
} );
} );

0 comments on commit 79aacfb

Please sign in to comment.