Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lunarias committed Oct 10, 2024
1 parent 7803598 commit f683c8b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions js/test/test-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ const testHelpers = new (function () {
return el.offsetParent === null;
};

this.isElementFocused = async function (tooltipButtonInputId) {
this.isElementFocused = async function (elId) {
const isElFocused = await page.evaluate((elId) => {
const el = document.querySelector(elId);
return el === document.activeElement;
}, elId);

const isButtonFocused = await page.evaluate((tooltipIconButtonId) => {
const button = document.querySelector(tooltipIconButtonId);
return button === document.activeElement;
}, tooltipButtonInputId);

return isButtonFocused;
return isElFocused;
}

this.getDesktopBrowser = async function (isBrowserVisible) {
Expand Down

0 comments on commit f683c8b

Please sign in to comment.