How to use the ember-tooltips/test-support/jquery.findTooltipTarget function in ember-tooltips

To help you get started, we’ve selected a few ember-tooltips examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sir-dunxalot / ember-tooltips / addon-test-support / jquery / get-position-differences.js View on Github external
export function getTooltipAndTargetPosition(options = {}) {
  const { selector, targetSelector } = options;
  const [ target ] = findTooltipTarget(targetSelector);
  const [ tooltip ] = findTooltip(selector, { targetSelector });

  const targetPosition = target.getBoundingClientRect();
  const tooltipPosition = tooltip.getBoundingClientRect();

  return {
    targetPosition,
    tooltipPosition,
  };
}