Skip to content

Commit

Permalink
Make sure the editor is visible before getting its rect
Browse files Browse the repository at this point in the history
  • Loading branch information
calixteman committed Jul 3, 2024
1 parent ccad2f8 commit fd6d0be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/integration/test_utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function getSelector(id) {
async function getRect(page, selector) {
// In Chrome something is wrong when serializing a `DomRect`,
// so we extract the values and return them ourselves.
await page.waitForSelector(selector);
await page.waitForSelector(selector, { visible: true });
return page.$eval(selector, el => {
const { x, y, width, height } = el.getBoundingClientRect();
return { x, y, width, height };
Expand Down

0 comments on commit fd6d0be

Please sign in to comment.