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

CalendarSelect test helper is selecting the date even though it is disabled #263

Open
nagasai-praveen opened this issue Nov 10, 2020 · 0 comments

Comments

@nagasai-praveen
Copy link

I have passed minDate: new Date(2020,10,11), maxDate: new Date(2020,10,21) to my date component. So out of this range, no date should be selectable When i checked it manually everything works fine. But when I am trying to write test the behavior using calendarSelect test helper it is selecting the date.

assert.equal(get(this, 'defaultFieldModel.fFrom'), '', 'field data in model is empty');
    await click('.date-control .ember-basic-dropdown-trigger');
    debugger;
    await calendarSelect('.ember-power-calendar', new Date('2013-10-28'));
    debugger;
    assert.equal(findAll('.date-control input')['length'], 1, 'The date control renders properly');
    assert.equal(findAll('.date-control input')[0]['value'], '02/28/2013', 'The date is setted renders properly');
    assert.equal(get(this, 'defaultFieldModel.fFrom'), '2013-02-28T00:00:00.000Z', 'Model contains 2013-02-28T00:00:00.000Z  as field value');
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