Skip to content

Commit

Permalink
Fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jun 14, 2021
1 parent c778b9a commit 3563080
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
8 changes: 4 additions & 4 deletions packages/e2e-tests/specs/editor/various/writing-flow.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,10 +577,10 @@ describe( 'Writing Flow', () => {

// Find a point outside the paragraph between the blocks where it's
// expected that the sibling inserter would be placed.
const paragraph = await page.$( '[data-type="core/paragraph"]' );
const paragraphRect = await paragraph.boundingBox();
const x = paragraphRect.x + ( 2 * paragraphRect.width ) / 3;
const y = paragraphRect.y + paragraphRect.height + 1;
const image = await page.$( '[data-type="core/image"]' );
const imageRect = await image.boundingBox();
const x = imageRect.x + ( 2 * imageRect.width ) / 3;
const y = imageRect.y - 1;

await page.mouse.click( x, y );

Expand Down
7 changes: 2 additions & 5 deletions packages/e2e-tests/specs/widgets/editing-widgets.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,8 @@ describe( 'Widgets screen', () => {

// Click outside the block to move the focus back to the widget area.
await page.mouse.click(
secondParagraphBlockBoundingBox.x +
firstWidgetAreaBoundingBox.width / 2,
secondParagraphBlockBoundingBox.y +
secondParagraphBlockBoundingBox.height +
10
secondParagraphBlockBoundingBox.x - 1,
secondParagraphBlockBoundingBox.y
);

// Hover above the last block to trigger the inline inserter between blocks.
Expand Down

0 comments on commit 3563080

Please sign in to comment.