This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(appointments) reason field no longer labelled as a required field when making appointments. #2003
Merged
Merged
feat(appointments) reason field no longer labelled as a required field when making appointments. #2003
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1f19bb8
npm yarn install
JDarke 1d922c7
fix(src/components/input/textfieldwithlabelformgroup.tsx): update Label
JDarke 7efe678
revert(package.json): remove yarn listing
JDarke c7dba69
Merge branch 'master' into master
ba91b21
Merge branch 'master' into master
404a7a2
Merge branch 'master' into master
6a2523c
Merge branch 'master' into master
9f8c1d7
Merge branch 'master' into master
9bfb378
Merge branch 'master' into master
71cd8b0
Merge branch 'master' into master
8cac332
Merge branch 'master' into master
92ad7f7
Merge branch 'master' into master
b7e355a
Merge branch 'master' into master
36b889e
test(textfieldwithlabelformgroup.test.tsx): add test to Label isRequired
JDarke 7791d9e
refactor(textfieldwithlabelformgroup.test.tsx): make props semantic
JDarke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can we add a test that, if
isRequired
is provided`, that it is passed to the label and marks the label as requiredThere 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.
As far as I can see, that's tested when FormLabel is imported into Label.tsx...see the attached screenshot (it seemed more useful to use a pic in this instance than to just post the code - apologies if that's incorrect practice!)
The /src/components path contains a lot more subfolders than my local clone, so I can't access a local copy of Label.tsx. Is that being compiled on the server side?
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.
The components that you are seeing are coming from this library:
https://github.com/HospitalRun/components
For this test, all we want to verify is that if the
isRequired
prop is given to theTextFieldWithLabelFormGroup
component, that is passes it to theLabel
component.It doesn't actually verify that the functionality is working, per se. We trust that the implementation of the
Label
component works as intended. What we are testing is that we are using theLabel
component correctly. See this test for how we tested the that the correct text is used:hospitalrun-frontend/src/__tests__/components/input/TextFieldWithLabelFormGroup.test.tsx
Line 7 in c703928
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.
Ah, I see...yup, I'll give it a go.
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.
Is the test to be added into TextFieldWithLabelFormGroup.test.tsx (with the text field test suite you referenced) or should it be a separate local test in TextFieldWithLabelFormGroup.tsx?
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.
Either! I don't have a preference
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.
I've got a new commit to push, but it's telling me that my local and remote have diverged. Tried a pull to merge them, and my terminal locked up. Restarted and retried, and now I have this message in terminal:
Is this fixable, or do I need to save my local changes, re-clone the repo to local, and then send a whole new PR, or does it need to be connected to this thread's 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.
Here's the test, btw:
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.
Ah, I seem to have got it pushed now, and it looks like the earlier ones did, too. Apologies if I'm cluttering up this PR with multiple commits.