/**
 * Trigger blur event on E2E test.
 *
 * @param {Object} page - Page instance of newE2EPage()
 * @param {string} targetQuery - Query to target triggered element. E.g. "telia-text-input input"
 */
const triggerBlur = async (page, targetQuery) => {
  await page.focus(targetQuery);
  await page.keyboard.press('Tab');
  await page.waitForChanges();
};
export default triggerBlur;
