Merge pull request #18374 from calixteman/test_editor_visible
Make sure the editor is visible before getting its rect
This commit is contained in:
commit
03a0500dcf
@ -135,7 +135,7 @@ function getSelector(id) {
|
|||||||
async function getRect(page, selector) {
|
async function getRect(page, selector) {
|
||||||
// In Chrome something is wrong when serializing a `DomRect`,
|
// In Chrome something is wrong when serializing a `DomRect`,
|
||||||
// so we extract the values and return them ourselves.
|
// so we extract the values and return them ourselves.
|
||||||
await page.waitForSelector(selector);
|
await page.waitForSelector(selector, { visible: true });
|
||||||
return page.$eval(selector, el => {
|
return page.$eval(selector, el => {
|
||||||
const { x, y, width, height } = el.getBoundingClientRect();
|
const { x, y, width, height } = el.getBoundingClientRect();
|
||||||
return { x, y, width, height };
|
return { x, y, width, height };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user