Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this possible to test with protractor? #75

Open
ericfrancis opened this issue Feb 17, 2017 · 1 comment
Open

Is this possible to test with protractor? #75

ericfrancis opened this issue Feb 17, 2017 · 1 comment

Comments

@ericfrancis
Copy link

No description provided.

@ericfrancis
Copy link
Author

ericfrancis commented Feb 23, 2017

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();
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant