How to use the ember-power-calendar/test-support.calendarSelect function in ember-power-calendar

To help you get started, we’ve selected a few ember-power-calendar 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-calendar / test-support / helpers / ember-power-calendar.js View on Github external
registerAsyncHelper('calendarSelect', async function(app, selector, selected) {
    return calendarSelect(selector, selected);
  });
}
github jelhan / croodle / tests / pages / create / options.js View on Github external
async value(dateOrMoments) {
      assert(
        'selectDates expects an array of date or moment objects as frist argument',
        isArray(dateOrMoments) && dateOrMoments.every((dateOrMoment) => dateOrMoment instanceof Date || moment.isMoment(dateOrMoment))
      )

      for (let i = 0; i < dateOrMoments.length; i++) {
        let dateOrMoment = dateOrMoments[i];
        let date = moment.isMoment(dateOrMoment) ? dateOrMoment.toDate() : dateOrMoment;
        await calendarSelect(selector, date);
      }
    }
  };
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);
  });
}

ember-power-calendar

Powerful and customizable calendar component for Ember

MIT
Latest version published 3 days ago

Package Health Score

81 / 100
Full package analysis