Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

test: migrate tests to React Testing Library #2516

Merged
merged 568 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
568 commits
Select commit Hold shift + click to select a range
5eea518
Merge pull request #161 from emma-r-slight/emma-labsList
nobrayner Dec 31, 2020
0a9570f
test(duplicatenewpatientmodal.test.tsx): update tests to use RTL
emma-r-slight Dec 31, 2020
865dcfd
Merge remote-tracking branch 'origin/master' into codyarose_Diagnosis…
codyarose Dec 31, 2020
7c00669
Merge pull request #165 from codyarose/codyarose_Labs
nobrayner Dec 31, 2020
af591cb
Merge pull request #160 from codyarose/codyarose_DiagnosisForm
nobrayner Dec 31, 2020
8159479
fix(searchpatients.test): add "await" to async tests
emma-r-slight Dec 31, 2020
c4e194b
Merge pull request #170 from emma-r-slight/emma-duplicatePatient
nobrayner Dec 31, 2020
0fc87c2
Merge branch 'master' of https://github.com/kcdraidgroup/hospitalrun-…
JacobMGEvans Dec 31, 2020
120995a
Merge branch 'master' of https://github.com/kcdraidgroup/hospitalrun-…
JacobMGEvans Dec 31, 2020
1b2f258
Merge branch 'master' of https://github.com/kcdraidgroup/hospitalrun-…
JacobMGEvans Dec 31, 2020
147013b
Convert MedicationsList.test.tsx to RTL
codyarose Dec 31, 2020
a264672
Merge pull request #162 from kcdraidgroup/juhanakristian-improve-visi…
JacobMGEvans Dec 31, 2020
ed71f41
Merge pull request #153 from kcdraidgroup/juhanakristian-152
JacobMGEvans Dec 31, 2020
d84a4e0
Merge pull request #151 from kcdraidgroup/juhanakristian-150
JacobMGEvans Dec 31, 2020
f55e09b
Merge pull request #173 from codyarose/codyarose_MedicationsList
JacobMGEvans Dec 31, 2020
53ed6e2
Convert ImportantPatientInfo.test.tsx to RTL
codyarose Dec 31, 2020
b4f1dbc
Tests Setup and Cleanup for GeneralInformation test conversion
JacobMGEvans Dec 31, 2020
f760ef8
Merge pull request #176 from codyarose/codyarose_ImportantPatientInfo
JacobMGEvans Dec 31, 2020
3748223
Merge branch 'master' of https://github.com/kcdraidgroup/hospitalrun-…
JacobMGEvans Dec 31, 2020
bceb054
test(patients): convert to rtl
nobrayner Dec 31, 2020
5ef29a1
test(relatedpersonstab): convert to rtl
nobrayner Dec 31, 2020
94fe727
fix(tests): cleaning up mocks so they don't leak
nobrayner Dec 31, 2020
92c027d
test(view appointments): make tests time agnostic
nobrayner Dec 31, 2020
ffa4d9e
Convert AddRelatedPersonModal.test.tsx to RTL
codyarose Dec 31, 2020
00064ec
test(query-hooks): update remaining query hooks to use executeQuery u…
mpeyper Dec 31, 2020
cc46717
test(contactinfo.test.tsx): update test to use RTL
emma-r-slight Dec 31, 2020
c9f73f3
Merge pull request #182 from mpeyper/mpeyper
JacobMGEvans Dec 31, 2020
d64822e
Merge pull request #183 from emma-r-slight/emma-ContactInfo
JacobMGEvans Dec 31, 2020
0e7d25e
GeneralInfo Error test converted
JacobMGEvans Dec 31, 2020
2594cde
Update AddRelatedPersonModal to fix save test
codyarose Dec 31, 2020
ad4c873
More than half of non editable input scenerios are converted
JacobMGEvans Dec 31, 2020
67101bd
Merge remote-tracking branch 'origin/master' into codyarose_AddRelate…
codyarose Dec 31, 2020
9fa9fd3
fix(test): failing in ci
nobrayner Dec 31, 2020
f028b10
fix(test): increase timeout
nobrayner Dec 31, 2020
46c77dc
Mostly done with converting non-editable describe block
JacobMGEvans Dec 31, 2020
b3be647
Merge pull request #181 from codyarose/codyarose_AddRelatedPersonModal
nobrayner Dec 31, 2020
059bac4
Merge pull request #180 from kcdraidgroup/nobrayner-163
nobrayner Dec 31, 2020
f12f344
fix(test): incorrect date formats
nobrayner Dec 31, 2020
0638d44
fix(test): add typing delay so search gets called correctly
nobrayner Dec 31, 2020
baf9c2b
Abstracted assertion pattern that was repeating
JacobMGEvans Dec 31, 2020
ce51bca
fix(tests): incorrectly resetting canvas mock
nobrayner Dec 31, 2020
ce82875
test(appointment detail form): convert to rtl
nobrayner Jan 1, 2021
988ad76
GeneralInformation RTL Conversion complete
JacobMGEvans Jan 1, 2021
bfd107f
Merge pull request #185 from kcdraidgroup/nobrayner-184
nobrayner Jan 1, 2021
31a0a70
match the i18 key environment
JacobMGEvans Jan 1, 2021
cb00401
Datepicker element in CI not found
JacobMGEvans Jan 1, 2021
a58d186
fix(test): increase findBy timeouts for dates
nobrayner Jan 1, 2021
7fe5ee0
fix(test): prettier error
nobrayner Jan 1, 2021
d2866f2
test(appointments): convert to rtl
nobrayner Jan 1, 2021
42f5f8d
Merge pull request #187 from kcdraidgroup/nobrayner-186
nobrayner Jan 1, 2021
9e69c0b
fix(test): pass correctly formatted dates
nobrayner Jan 1, 2021
791bfdc
Merge pull request #179 from kcdraidgroup/jacobmgevans
nobrayner Jan 1, 2021
b028a4d
Convert NewPatient.test.tsx to RTL
codyarose Jan 1, 2021
18083f6
test(mutation-hooks): cleaned up excessive use of act in mutation hoo…
mpeyper Jan 1, 2021
6fd366f
test(hooks): clean up hook tests
mpeyper Jan 1, 2021
4aaa334
test(network-status-message): remove unnecessary usage of @testing-li…
mpeyper Jan 1, 2021
0dbddc1
Merge pull request #189 from mpeyper/mpeyper
JacobMGEvans Jan 1, 2021
b564ccf
chore(new patient): comment out test for now
nobrayner Jan 1, 2021
ffeae97
Merge pull request #188 from codyarose/codyarose_NewPatient
JacobMGEvans Jan 1, 2021
2e0a242
Refactor test setup for file
JacobMGEvans Jan 1, 2021
6bb0bfa
Refactored test setup Sidebar file
JacobMGEvans Jan 1, 2021
855611f
Merge pull request #190 from kcdraidgroup/jacobmgevans
JacobMGEvans Jan 1, 2021
1a49469
chore(enzyme): remove enzyme
nobrayner Jan 1, 2021
775c8d6
chore(test): cleanup
nobrayner Jan 2, 2021
2a8f982
chore(deps): add react-test-renderer
nobrayner Jan 2, 2021
01c1b52
fix(test): attempt to fix bad datetime test
nobrayner Jan 2, 2021
1957426
Merge pull request #191 from kcdraidgroup/remove-enzyme
nobrayner Jan 2, 2021
f6d8271
Merge commit '95ad3252e548e33c86bfde9304d07cfab608e81b' into aprillion
Aprillion Jan 2, 2021
2899482
Merge pull request #193 from kcdraidgroup/aprillion
Aprillion Jan 2, 2021
6bbd731
fix(test): editing address in GeneralInformation
Aprillion Jan 2, 2021
733b26e
fix(test): `NaN` is an invalid value
Aprillion Jan 2, 2021
53be3d1
Merge pull request #196 from kcdraidgroup/aprillion
Aprillion Jan 2, 2021
c5fab6b
Partially related to issue #195, remove customHook redundant tests in…
JacobMGEvans Jan 2, 2021
39d5aa4
Merge pull request #197 from kcdraidgroup/jacobmgevans
JacobMGEvans Jan 2, 2021
4dff109
Remove redundant test and clean up ImagingRequestTable
codyarose Jan 3, 2021
ca47677
Added settings tests
JacobMGEvans Jan 3, 2021
29c4c76
Merge pull request #199 from kcdraidgroup/jacobmgevans
JacobMGEvans Jan 3, 2021
67d6d29
Replace IncidentRepository calls, improve table query
codyarose Jan 3, 2021
26e35dd
Refactor setup to remove dupe code, removed redundant test, improved …
codyarose Jan 3, 2021
e1aa92b
Fixed updateTitle (setState) call not being within useEffect
codyarose Jan 3, 2021
2192e60
Refactored to use screen instead of container where possible, inline …
codyarose Jan 3, 2021
405ec6d
test(medicationlist.test.tsx): improve test coverage
emma-r-slight Jan 3, 2021
49f96da
fix(test): improve CareGoalForm
Aprillion Jan 3, 2021
63e7bb4
test(appointmentslist.test.tsx): update table test to use getByRole
emma-r-slight Jan 3, 2021
f18900b
test(viewallergy.test.tsx): remove act from file and add getbyrole
emma-r-slight Jan 3, 2021
abc6718
Merge pull request #208 from kcdraidgroup/aprillion
JacobMGEvans Jan 3, 2021
081246c
Merge pull request #207 from emma-r-slight/emma-refactor-tests
JacobMGEvans Jan 3, 2021
941c724
Merge pull request #205 from codyarose/codyarose_Incidents
JacobMGEvans Jan 3, 2021
7a45922
Merge pull request #203 from codyarose/codyarose_ViewIncidentsTable
JacobMGEvans Jan 3, 2021
4f154e3
Merge pull request #201 from codyarose/codyarose_ViewIncidents
JacobMGEvans Jan 3, 2021
7a162f2
Merge pull request #200 from codyarose/codyarose
JacobMGEvans Jan 3, 2021
cb47735
fix(test): check ViewIncidents expected data
Aprillion Jan 3, 2021
77266c0
fix(test): improve VisitForm
Aprillion Jan 3, 2021
8a88313
Add aria-label to make form role available
codyarose Jan 3, 2021
5b8d39c
Refactored to follow RTL setup convention, improved /incidents/new te…
codyarose Jan 3, 2021
8da5bc4
fix(test): improve DateTimePickerWithLabelFormGroup
Aprillion Jan 3, 2021
f056391
fix(test): improve DatePickerWithLabelFormGroup
Aprillion Jan 3, 2021
afee1a2
Added name to getByRole query
codyarose Jan 3, 2021
a42b3ee
chore(test): delete VisitForm
Aprillion Jan 3, 2021
b055637
Merge pull request #213 from kcdraidgroup/aprillion-4
mpeyper Jan 3, 2021
12d80ce
Merge pull request #211 from codyarose/codyarose
JacobMGEvans Jan 3, 2021
7ebd924
Merge pull request #210 from kcdraidgroup/aprillion-2
JacobMGEvans Jan 3, 2021
0cb3562
Merge pull request #209 from kcdraidgroup/aprillion-1
JacobMGEvans Jan 3, 2021
13b8e41
Merge pull request #212 from kcdraidgroup/aprillion-3
JacobMGEvans Jan 3, 2021
7d4a8b0
Merge pull request #214 from emma-r-slight/emma-improve-tests
JacobMGEvans Jan 3, 2021
db92fcb
Refactored setup function
codyarose Jan 3, 2021
fd539b9
fix(test): add visit modal should check fields are disabled
nobrayner Jan 4, 2021
21aa5f1
Merge pull request #215 from codyarose/codyarose_ImagingRequestTable
JacobMGEvans Jan 4, 2021
19d2517
Merge pull request #216 from kcdraidgroup/nobrayner-x
JacobMGEvans Jan 4, 2021
d4d8e96
fix(test): fix non-null assertion check warning
codyarose Jan 4, 2021
ed61bcf
test(ViewIncident.test.tsx): remove redundant breadcrumbs component test
codyarose Jan 4, 2021
99a0752
actually remove, not just comment out
codyarose Jan 4, 2021
f7e8606
feat: add testid to visit field for testing
codyarose Jan 4, 2021
1f1c109
refactor: improve queries - remove function call tests
codyarose Jan 4, 2021
789fff8
Merge pull request #217 from codyarose/codyarose
nobrayner Jan 4, 2021
5992dad
Merge pull request #218 from codyarose/codyarose_ViewIncidents
nobrayner Jan 4, 2021
a22a455
Merge pull request #219 from codyarose/codyarose_NewLabRequest
JacobMGEvans Jan 4, 2021
9dc8111
Revert "refactor(NewLabRequest): improve queries - remove function ca…
JacobMGEvans Jan 4, 2021
f3d5f0e
Merge pull request #220 from kcdraidgroup/revert-219-codyarose_NewLab…
JacobMGEvans Jan 4, 2021
cde4a39
Remove querySelector from ViewApplointments
juhanakristian Jan 4, 2021
2015a17
Merge pull request #221 from kcdraidgroup/juhanakristian-ViewAppointm…
JacobMGEvans Jan 5, 2021
3add6f6
test(incidents): improve assertions & render
tigerabrodi Jan 5, 2021
fa037d6
Merge pull request #223 from kcdraidgroup/tigerabrodi-improve-inciden…
tigerabrodi Jan 5, 2021
a3c09a8
Merge branch 'master' of https://github.com/HospitalRun/hospitalrun-f…
JacobMGEvans Jan 7, 2021
c06b426
fix(test): report incident
nobrayner Jan 7, 2021
3862c6e
fix(test): navbar
nobrayner Jan 7, 2021
9940f72
fix(test): sidebar
nobrayner Jan 7, 2021
4903ba5
Merge pull request #224 from kcdraidgroup/jacobmgevans
nobrayner Jan 7, 2021
026e44d
feat: add testid to visit field for testing
codyarose Jan 7, 2021
3aa4b89
refactor: improve queries - remove function call tests
codyarose Jan 7, 2021
5d6952c
Merge remote-tracking branch 'origin/master' into codyarose_NewLabReq…
codyarose Jan 7, 2021
8d98934
fix: merge conflict
nobrayner Jan 7, 2021
ac35b21
Merge pull request #225 from codyarose/codyarose_NewLabRequest
nobrayner Jan 7, 2021
7c53673
Merge pull request #226 from kcdraidgroup/update-upstream
nobrayner Jan 7, 2021
e9ee1f8
test(report-incident): improvements
tigerabrodi Jan 7, 2021
76f5280
test(view-lab): improvements
tigerabrodi Jan 7, 2021
2bdc2e0
Merge pull request #228 from kcdraidgroup/tigerabrodi-report-incident…
tigerabrodi Jan 7, 2021
4763780
test(medication-request-table): improvements
tigerabrodi Jan 7, 2021
692893c
Merge pull request #230 from kcdraidgroup/tigerabrodi-improve-viewlab…
tigerabrodi Jan 7, 2021
386574b
fixup! redo changes
tigerabrodi Jan 7, 2021
e94d817
Merge pull request #232 from kcdraidgroup/tigerabrodi-medication-requ…
JacobMGEvans Jan 7, 2021
f3139e8
Revert "test(report-incident): improvements"
JacobMGEvans Jan 7, 2021
8693002
Merge pull request #238 from kcdraidgroup/revert-228-tigerabrodi-repo…
JacobMGEvans Jan 7, 2021
d736383
Removes render setup
juhanakristian Jan 7, 2021
6ba9e6a
Replace render with setup
juhanakristian Jan 7, 2021
94f5b9f
Remove unnecessary asyncs
juhanakristian Jan 7, 2021
05d2e17
Merge pull request #235 from kcdraidgroup/juhanakristian-patientsearc…
JacobMGEvans Jan 7, 2021
67c29c7
Merge pull request #237 from kcdraidgroup/juhanakristian-viewpatients…
JacobMGEvans Jan 7, 2021
f12b4db
fix(test): can create care goal
nobrayner Jan 7, 2021
467f063
fix(test): increase timeout
nobrayner Jan 7, 2021
a9acd72
fix(test): better wait for assertion
nobrayner Jan 7, 2021
3115437
fix(test): increase waitFor timeout
nobrayner Jan 8, 2021
5e4eba4
fix(test): linting
nobrayner Jan 8, 2021
4cf0e76
chore: use jest config instead of setup tests
nobrayner Jan 8, 2021
31c2b1e
test: improve labs/Labs.test.tsx
codyarose Jan 8, 2021
2e19466
fix(test): increase timeout
nobrayner Jan 8, 2021
c47ce48
Merge pull request #240 from kcdraidgroup/nobrayner-prfb-1
nobrayner Jan 8, 2021
a1b4eb2
test: improve labs/ViewLab.test~
codyarose Jan 8, 2021
b17f15e
Merge remote-tracking branch 'origin/master' into codyarose_ViewLab
codyarose Jan 8, 2021
90a1757
Merge remote-tracking branch 'origin/master' into codyarose_Labs
codyarose Jan 8, 2021
6aa7654
Merge pull request #244 from codyarose/codyarose_ViewLab
nobrayner Jan 8, 2021
0c1ac98
Merge pull request #242 from codyarose/codyarose_Labs
nobrayner Jan 8, 2021
8782d24
test: improve labs/ViewLabs.test
codyarose Jan 8, 2021
d5ae24a
Merge remote-tracking branch 'origin/master' into codyarose_ViewLabs
codyarose Jan 8, 2021
118d285
test: search functionality test
codyarose Jan 8, 2021
e81e959
fix(test): use dashboard + url to check
nobrayner Jan 8, 2021
86122a9
fix(test): replace spinner and snapshots with better user assertions
nobrayner Jan 8, 2021
fc0f308
fix(test): consistent it instead of test
nobrayner Jan 8, 2021
6727764
fix(test): more descriptive test titles + test cleanup
nobrayner Jan 8, 2021
1e7ff86
Merge pull request #248 from kcdraidgroup/nobrayner-prfb-2
nobrayner Jan 8, 2021
a2e644b
test(viewincidentdetails.test.tsx): add back deleted tests using RTL
emma-r-slight Jan 9, 2021
e707c77
test(viewincidentdetails.test.tsx): finish improving test description…
emma-r-slight Jan 9, 2021
d7659bc
feat: add testid's to NewMedicationRequest fields
codyarose Jan 9, 2021
40df690
test: improve NewMedicationRequest test
codyarose Jan 9, 2021
afb2a77
Merge remote-tracking branch 'origin/master' into codyarose_NewMedica…
codyarose Jan 9, 2021
13dea3e
test: remove act import
codyarose Jan 9, 2021
f3e9b12
Merge remote-tracking branch 'origin/master' into codyarose_ViewLabs
codyarose Jan 9, 2021
6835c6e
test(improve test descriptions): improve Test descriptions
emma-r-slight Jan 9, 2021
f97d303
Merge branch 'master' of https://github.com/kcdraidgroup/hospitalrun-…
emma-r-slight Jan 9, 2021
0ca15f2
Merge pull request #253 from emma-r-slight/emma-improve-test-desriptions
JacobMGEvans Jan 9, 2021
d34999a
Merge pull request #252 from codyarose/codyarose_NewMedicationRequest
JacobMGEvans Jan 9, 2021
128a9ff
test(allergieslist.test): update alert test
emma-r-slight Jan 10, 2021
d7090b4
Merge pull request #254 from emma-r-slight/emma-improveTests
JacobMGEvans Jan 10, 2021
99326ff
test: improve queries, remove unused mocks
codyarose Jan 10, 2021
f6ec2e5
Merge remote-tracking branch 'origin/master' into codyarose_Medications
codyarose Jan 10, 2021
70a1bc0
test: readded mocks
codyarose Jan 10, 2021
8722ac7
test: refactored setup function
codyarose Jan 10, 2021
06e143c
test: refactor setup function, update queries
codyarose Jan 10, 2021
78f0566
test: add modal open/close test to Allergies
codyarose Jan 10, 2021
8a845dc
test: remove redundant close and save tests => covered in patients/al…
codyarose Jan 10, 2021
7898ddf
test: add waitforelementtoberemoved
codyarose Jan 10, 2021
b0a87e1
Merge pull request #246 from codyarose/codyarose_ViewLabs
JacobMGEvans Jan 10, 2021
1d3cf9e
Merge pull request #256 from codyarose/codyarose_Medications
JacobMGEvans Jan 10, 2021
3131da3
Merge pull request #257 from codyarose/codyarose_Allergies
JacobMGEvans Jan 10, 2021
e72e76f
Remove eslint console ignores
JacobMGEvans Jan 10, 2021
e92f559
Merge branch 'master' of https://github.com/kcdraidgroup/hospitalrun-…
JacobMGEvans Jan 10, 2021
051048e
Naming convention improved per Jacks suggestion
JacobMGEvans Jan 10, 2021
03fcc58
Merge pull request #259 from kcdraidgroup/jacobmgevans
JacobMGEvans Jan 10, 2021
88c3e47
Merge remote-tracking branch 'origin/master' into codyarose_Allergies…
codyarose Jan 10, 2021
35af11a
Fix ViewLabs.test.tsx
JacobMGEvans Jan 10, 2021
c9e23d1
Merge pull request #258 from codyarose/codyarose_AllergiesList
JacobMGEvans Jan 10, 2021
3d019ca
Merge branch 'master' of https://github.com/kcdraidgroup/hospitalrun-…
JacobMGEvans Jan 10, 2021
f824248
Removed negative confirmation
JacobMGEvans Jan 10, 2021
92e996a
Progress save
JacobMGEvans Jan 11, 2021
0ffa12f
test: refactor to check for title in /appointments
codyarose Jan 11, 2021
012bd0a
Merge remote-tracking branch 'origin/master' into codyarose_HospitalRun
codyarose Jan 11, 2021
7c884ab
Fixed ViewLabs Search functionality test
JacobMGEvans Jan 11, 2021
6c62b5b
Merge pull request #260 from kcdraidgroup/jacobmgevans
JacobMGEvans Jan 11, 2021
4943047
test(newimagingrequest.test): change test descriptions re PR review
emma-r-slight Jan 11, 2021
0bf14fd
Merge pull request #261 from codyarose/codyarose_HospitalRun
nobrayner Jan 11, 2021
63499e5
test: correct expect based on test description
codyarose Jan 11, 2021
671b0b3
Merge remote-tracking branch 'origin/master' into codyarose_ViewAllergy
codyarose Jan 11, 2021
e80383e
feat: add testids to inputs whose labels are not properly connected
codyarose Jan 11, 2021
f342ec5
Merge pull request #262 from emma-r-slight/emma-improveTests
nobrayner Jan 11, 2021
21487e5
test: clean up format imports
codyarose Jan 11, 2021
e5e83e3
Merge pull request #263 from codyarose/codyarose_ViewAllergy
nobrayner Jan 11, 2021
c8c61a3
Merge pull request #264 from codyarose/codyarose_InputTestIds
nobrayner Jan 11, 2021
7ac2655
test: refactor to remove now redundant testids
codyarose Jan 11, 2021
337cdb7
refactor: destructured lodash imports
codyarose Jan 11, 2021
4ec48e8
Merge pull request #265 from codyarose/codyarose_DateFnsCleanup
nobrayner Jan 11, 2021
aa7b639
test: refactor patient form queries
codyarose Jan 11, 2021
967e52c
test: refactor requests queries
codyarose Jan 11, 2021
69c5e13
Merge remote-tracking branch 'origin/master' into codyarose_UseInputT…
codyarose Jan 11, 2021
9821b83
test(noteslist.test): remove queryselector from test
emma-r-slight Jan 11, 2021
402392c
test(viewpatient.test.tsx): improve test description remove querysel…
emma-r-slight Jan 11, 2021
8ccb322
Merge pull request #267 from emma-r-slight/emma-improveTests
JacobMGEvans Jan 11, 2021
8e9228a
Merge remote-tracking branch 'origin/master' into codyarose_UseInputT…
codyarose Jan 12, 2021
acafa59
test: refactor patient info queries
codyarose Jan 12, 2021
21700c5
test: refactor setup and correct test
codyarose Jan 12, 2021
ac3efd2
test: refactor setup and queries
codyarose Jan 12, 2021
0b5535a
test: refactor setup to remove wrapper
codyarose Jan 12, 2021
84aba16
Copied tests from AddRelatedPersonModal.test.tsx to RelatedPersonsTab…
juhanakristian Jan 12, 2021
8d27975
Merge pull request #268 from codyarose/codyarose_RemoveWrappers
nobrayner Jan 12, 2021
07bbb35
Merge pull request #266 from codyarose/codyarose_UseInputTestids
nobrayner Jan 13, 2021
45451f3
Deletes AddRelatedPersonModal.test.tsx. Cleanup and improve integrati…
juhanakristian Jan 13, 2021
a57cab7
Fix variable name
juhanakristian Jan 13, 2021
998a785
Increase timeout
juhanakristian Jan 13, 2021
8d82cd8
Update with Upstream Master
JacobMGEvans Jan 14, 2021
0182da3
Fixed the change that utilized the requestedByFullName for defining t…
JacobMGEvans Jan 14, 2021
3888dc5
Merge pull request #271 from kcdraidgroup/jacobmgevans
JacobMGEvans Jan 14, 2021
fbd79d9
removed comment
JacobMGEvans Jan 14, 2021
b6f8d3d
Merge pull request #272 from kcdraidgroup/jacobmgevans
JacobMGEvans Jan 14, 2021
7fb20b0
test: add form labels and refactor queries
codyarose Jan 14, 2021
758daba
test: refactor sidebar active link queries
codyarose Jan 14, 2021
4860ebb
test: refactor to remove querySelector calls
codyarose Jan 14, 2021
6f3567c
test: removed unused imports
codyarose Jan 14, 2021
4e7e446
fix: increase timeout
nobrayner Jan 14, 2021
1ea596f
test: add back more semantic spinner queries
codyarose Jan 14, 2021
ac4e1e9
Merge pull request #273 from codyarose/codyarose_RemoveQuerySelectors
nobrayner Jan 14, 2021
a5f3b13
Merge pull request #270 from kcdraidgroup/juhanakristian-addrelatedpe…
nobrayner Jan 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
roots: ['<rootDir>/src'],
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
testMatch: ['**/__tests__/**/*.+(ts|tsx)', '**/?(*.)+(spec|test).+(ts|tsx)'],
coverageDirectory: './coverage',
testPathIgnorePatterns: ['<rootDir>/jest.config.js'],
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"@commitlint/config-conventional": "~11.0.0",
"@commitlint/core": "~11.0.0",
"@commitlint/prompt": "~11.0.0",
"@testing-library/react": "~11.2.0",
"@testing-library/jest-dom": "~5.11.6",
"@testing-library/react": "~11.2.2",
"@testing-library/react-hooks": "~3.7.0",
"@types/enzyme": "^3.10.5",
"@types/jest": "~26.0.0",
Expand Down Expand Up @@ -101,9 +102,8 @@
"eslint-plugin-react-hooks": "~4.1.0",
"history": "4.10.1",
"husky": "~4.3.0",
"jest": "24.9.0",
JacobMGEvans marked this conversation as resolved.
Show resolved Hide resolved
"lint-staged": "~10.5.0",
"jest-canvas-mock": "~2.3.0",
"lint-staged": "~10.5.0",
"memdown": "~5.1.0",
"prettier": "~2.2.0",
"redux-mock-store": "~1.5.4",
Expand Down
11 changes: 7 additions & 4 deletions src/__tests__/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { shallow } from 'enzyme'
import { render } from '@testing-library/react'
import React from 'react'
import { Provider } from 'react-redux'
import configureStore from 'redux-mock-store'

import App from '../App'

it('renders without crashing', () => {
// TODO: Causing Cannot log after tests are done. "Did you forget to wait for something async in your test? Attempted to log "Error: connect ECONNREFUSED 127.0.0.1:80 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1133:16)"
// ? MSW integration with tests
JacobMGEvans marked this conversation as resolved.
Show resolved Hide resolved
it('renders without crashing', async () => {
const mockStore = configureStore()({})

const AppWithStore = () => (
Expand All @@ -14,6 +16,7 @@ it('renders without crashing', () => {
</Provider>
)

const wrapper = shallow(<AppWithStore />)
expect(wrapper).toBeDefined()
const { container } = render(<AppWithStore />)
// ! until the Error mention in above TODO is resolved smoke testing the container is a placeholder
expect(container).toBeInTheDocument()
})
2 changes: 2 additions & 0 deletions src/setupTests.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable import/no-extraneous-dependencies */
import '@testing-library/jest-dom'
import Enzyme from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import 'jest-canvas-mock'
Expand All @@ -8,3 +9,4 @@ import './__mocks__/matchMediaMock'
import './__mocks__/react-i18next'

Enzyme.configure({ adapter: new Adapter() })
// eslint-disable-next-line import/no-extraneous-dependencies
JacobMGEvans marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"include": [
"src",
"types"
"types",
"./setupTests.js"
],
"exclude": [
"node_modules",
Expand Down