/**
 * getHostElement is used inside spec tests with SpeckPage, to select host element from the DOM.
 * getHostElement takes in two parameters page and selector.
 * page is SpecPage instance, that is created in spec test and selector is name of host element aka cusrom element,
 * that needs to fe selected.
 */
export async function getHostElement(page, selector) {
  const customElement = page.doc.querySelector(selector);
  const shadow = customElement.shadowRoot;
  const host = shadow.host;
  return host;
}
