-
Notifications
You must be signed in to change notification settings - Fork 79
test(input-date-picker): add test for no longer closing date-picker when using arrow and page keys. #9097
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
test(input-date-picker): add test for no longer closing date-picker when using arrow and page keys. #9097
Conversation
@anveshmekala I'm only seeing changes to a test in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anveshmekala Looking good!
|
||
await page.keyboard.press("PageDown"); | ||
await page.waitForChanges(); | ||
calendar = await page.find(`calcite-input-date-picker >>> .${CSS.calendarWrapper}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This selector is used frequently, can you store it in a local variable and reuse?
await page.keyboard.press("Enter"); | ||
await page.waitForChanges(); | ||
calendar = await page.find(`calcite-input-date-picker >>> .${CSS.calendarWrapper}`); | ||
expect(await calendar.isVisible()).toBe(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add finer-grained assertions on the month navigation? It looks like this is only asserting that the calendar is displayed. Applies to the test below.
await page.waitForChanges(); | ||
calendar = await page.find(`calcite-input-date-picker >>> .${CSS.calendarWrapper}`); | ||
expect(await calendar.isVisible()).toBe(false); | ||
expect(await inputDatePicker.getProperty("value")).not.toEqual(["2024-01-01", "2024-02-10"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity, can you assert on the actual values instead? Assertion-wise, this and the assertion on L1237 would pass if they are the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense.
This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐️⭐️⭐️⭐️⭐️
Reviewed on 4/26/2024
Awesome! Would review again!
…ustom-event * origin/main: fix(chip-group): Improve programmatic Chip selection behavior (#9213) test(input-date-picker): add test for no longer closing date-picker when using arrow and page keys. (#9097) build(deps): update actions/setup-node action to v4 (#9143) ci: adds support to test issue template priority status (#9192)
Related Issue: #9082
Summary
No longer closes
date-picker
ininput-date-picker
when user interacts with arrowKeys (arrowDown/arrowUp) or pageKeys (pageUp/pageDown).