How to use the ember-basic-dropdown/test-support/helpers.clickTrigger function in ember-basic-dropdown

To help you get started, we’ve selected a few ember-basic-dropdown 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 cibernox / ember-power-datepicker / test-support / helpers / ember-power-datepicker.js View on Github external
registerAsyncHelper('datepickerSelect', async function(app, selector, selected) {
    assert('`datepickerSelect` expect a Date or MomentJS object as second argument', selected);
    let $selector = find(selector);
    assert('`datepickerSelect` couln\'t find any element with selector: ' + selector, $selector.length);
    let $trigger;
    if ($selector.hasClass('ember-power-datepicker-trigger')) {
      $trigger = $selector;
    } else {
      $trigger = find(`${selector} .ember-power-datepicker-trigger`);
      assert('`datepickerSelect` couln\'t find any datepicker within the selector ' + selector, $trigger.length);
      selector = `${selector} .ember-power-datepicker-trigger`;

    await clickTrigger(selector);
    await calendarSelect('.ember-power-datepicker-content', selected);