-
Notifications
You must be signed in to change notification settings - Fork 34
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
re-addChore/tests select dataset model #186
Conversation
… capture input blocks and generate report graphql triggered
…ion debounced change handler
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.
Approved
… which are already defined in package.json and remove ts-jest
e2712b7
to
d55cb73
Compare
b4f6745
to
f4a3f85
Compare
@imda-benedictlee |
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.
re-addChore/tests select dataset model The requested reviews are Approved. Proceeded to merge PR to Main.
Description
PR contains mostly unit tests updates for canvas and user input screen (select model , dataset and fill inputs).
Also contains minor improvement to when the
saved
message is displayed when save button is clicked on header.__tests__
and__mock__
subfolders (also include jest files)ai-verify-portal/src/modules/project/header.tsx
are additions of lines on save button click handling. The existingsave
function is called and no change is made to that. Additional new codes are added after it to ensure that theProject saved
message is displayed only after save is successful. Previously, it was just displayed without checking if save is successful. With this improvement, unit test can assert the APIs that's needed to be called when save is clicked.toErrorWithMessage
simply improves the error message formatting (out put are normally just logged in browser console). No impact to functionality.ai-verify-portal/src/modules/projectTemplate/canvas.tsx
wherenew Date().getTime()
is changed toDate.now()
. Both return the exact same thing. Changing toDate.now()
allows us to stub and mock it in unit tests`ai-verify-portal/src/modules/projectTemplate/canvas.tsx
areisNaN
handlings which only happens in unit tests jsdom, because there are no screen pixel level calculations or details available.Motivation and Context
Increase unit tests coverage
Type of Change
How to Test
npm test
Project Saved
message is displayedChecklist
Please check all the boxes that apply to this pull request using "x":
Screenshots (if applicable)
Additional Notes
[Add any additional information or context that might be relevant to reviewers.]
Developer Certificate of Origin