kevinoleary19/Angular-2-Datepicker

Is this possible to test with protractor?

Opened this issue · 1 comments

Is this possible to test with protractor?

Was able to test with

// protractor spec
    // click date
    dateElement.click();

    // get the navigation arrows
    const datePickerArrows = dateElement.$$( '.datepicker__calendar__nav__arrow' );
    // click right arrow
    const datePickerRightArrow = datePickerArrows.get( 1 );
    datePickerRightArrow.click();

    // get the days
    // only actual dates have span elements
    const datePickerDays = dateElement.$$( '.datepicker__calendar__month__day > span' );
    return datePickerDays.count().then( count => {
      return datePickerDays.get( count - daysFromEndOfMonth ).click();
    });