-
Notifications
You must be signed in to change notification settings - Fork 414
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
Added support for time in dateinput component #8504
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
CARE Run #3701
Run Properties:
|
Project |
CARE
|
Run status |
Passed #3701
|
Run duration | 03m 15s |
Commit |
5e69cf0064: Added support for time in dateinput component
|
Committer | Shivank Kacker |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
125
|
d387e4d
to
e62e655
Compare
…support-time-in-dateinput
Personal Note: Bro, instead of modifying the entire Cypress test to make it pass, try to understand the core problem of test fail. Then, debug it CC: @gigincg |
@shivankacker Bro, create a checklist of all the forms where you're changing the component and add it to the description. Review the functionality and responsiveness of each form one by one before requesting the next QA review. |
Will check and fix this one.
Screen.Recording.2024-09-13.at.9.31.58.PM.movBecause this behaviour was changed, the tests were also changed. Adding any format restrictions WHILE a user is typing would always result in these kind of issues.
cc. @gigincg |
…e some fixes for very edge cases
cc. @gigincg |
53b1983
to
79cdb31
Compare
…support-time-in-dateinput
Note: for this behavior to replicate, access the field, when it is in the bottom of the page, as similar you are viewing in the screenshot
|
👋 Hi, @shivankacker, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
The text is in 24 hour format so that the user can just input numbers and does not have to input AM/PM through the keyboard. Also reduces the code complexity. We can take it up later if any issue arises from the field. |
cy.get('[data-test-id="date-input"]:visible [data-time-input="0"]') | ||
.click(0, 0) | ||
.type(lastServicedOn); | ||
cy.get("body").click(0, 0); |
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.
why are you using the hardcoded position, rather try using cy.clickAndTypeDate() command
cy.get('[data-test-id="date-input"]:visible [data-time-input="0"]') | ||
.click() | ||
.type(lastServicedOn); | ||
cy.get("body").click(0, 0); |
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.
here also, try the command function mention above
cy.get('[data-test-id="date-input"]:visible [data-time-input="0"]') | ||
.click() | ||
.type(text); | ||
cy.get("body").click(0, 0); |
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.
here also, try the command function mention above
cy.get('[data-test-id="date-input"]:visible [data-time-input="0"]') | ||
.click() | ||
.type(date); | ||
cy.get("body").click(0, 0); |
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.
here also, try the command function mention above
cy.get('[data-test-id="date-input"]:visible [data-time-input="0"]') | ||
.click() | ||
.type(date); | ||
cy.get("body").click(0, 0); |
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.
here also, try the command function mention above
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.
- dont use hardcoded position based click in cypress test
- try to use cy.clickAndTypeDate() command or something reusable
Proposed Changes
DateInputV2
component.@ohcnetwork/care-fe-code-reviewers
Merge Checklist