How to use the ember-tooltips/test-support/dom.findTooltip 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 / dom / assertions / assert-tooltip-rendered.js View on Github external
export default function assertTooltipRendered(assert, options = {}) {
  const { selector } = options;
  const tooltip = findTooltip(selector, options);

  assert.ok(tooltip, 'assertTooltipRendered(): the ember-tooltip should be rendered');
}
github sir-dunxalot / ember-tooltips / addon-test-support / dom / assertions / assert-tooltip-visible.js View on Github external
export default function assertTooltipVisible(assert, options = {}) {
  const { selector } = options;
  const tooltip = findTooltip(selector, options);
  const ariaHidden = tooltip.getAttribute('aria-hidden');

  assert.ok(ariaHidden === 'false',
    `assertTooltipVisible(): the ember-tooltip should be visible:
      aria-hidden = ${ariaHidden}`);
}
github sir-dunxalot / ember-tooltips / addon-test-support / dom / assertions / assert-tooltip-not-rendered.js View on Github external
export default function assertTooltipNotRendered(assert, options = {}) {
  const { selector } = options;
  const tooltip = findTooltip(selector, options);

  assert.notOk(tooltip, 'assertTooltipNotRendered(): the ember-tooltip should not be rendered');
}
github sir-dunxalot / ember-tooltips / addon-test-support / dom / assertions / assert-tooltip-not-visible.js View on Github external
export default function assertTooltipNotVisible(assert, options = {}) {
  const { selector } = options;
  const tooltip = findTooltip(selector, options);
  const ariaHidden = tooltip.getAttribute('aria-hidden');

  assert.ok(ariaHidden === 'true',
    `assertTooltipNotVisible(): the ember-tooltip shouldn't be visible:
      aria-hidden = ${ariaHidden}`);
}
github sir-dunxalot / ember-tooltips / addon-test-support / dom / assertions / assert-tooltip-content.js View on Github external
export default function assertTooltipContent(assert, options = {}) {
  const { contentString, selector } = options;

  if (isNone(contentString)) {
    emberAssert('You must specify a contentString property in the options parameter');
  }

  const tooltip = findTooltip(selector, options);
  const tooltipContent = tooltip.innerText.trim();

  assert.equal(tooltipContent, contentString,
    `Content of tooltip (${tooltipContent}) matched expected (${contentString})`);

}