hackforla / lucky-parking

Visualization of parking data to assist in understanding of the effects of parking policies on a neighborhood by neighborhood basis in the City of Los Angeles
https://www.hackforla.org/projects/lucky-parking.html
34 stars 60 forks source link

Testing Coverage for Citation Data Filter #603

Closed christianjro closed 9 months ago

christianjro commented 9 months ago

Description

Created citation-data-filter.test.tsx file to test the CitationDataFilter component. Within it I test that all fields render with the correct placeholders. I also added interactions with each input field and tested the expected behaviors.

Related Issues

Resolves #574

Testing

PASS  src/features/citation/ui/citation-data-category-selection.test.tsx
PASS  src/widgets/radius-tool/radius-tool.test.tsx
PASS  ../ui/src/components/modal/modal.test.tsx
PASS  src/features/instructions/how-it-works-button.test.tsx
PASS  src/features/citation/ui/citation-data-filter.test.tsx
PASS  src/features/citation/ui/citation-date-presets-selection.test.tsx
PASS  ../ui/src/components/radio-group/radio-group.test.tsx
PASS  ../ui/src/components/pick-list/pick-list.test.tsx
PASS  ../ui/src/components/stepper/stepper.test.tsx
PASS  ../ui/src/components/input/input.test.tsx
PASS  src/widgets/header/header.test.tsx

Test Suites: 11 passed, 11 total
Tests:       63 passed, 63 total
Snapshots:   0 total
Time:        29.457 s, estimated 31 s
Ran all test suites.
File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 19.83 21.27 21.47 19.64  
src 0 100 100 0  
main.tsx 0 100 100 0 1-6
vite-env.d.ts 0 0 0 0  
src/app 0 100 0 0  
index.ts 0 100 0 0 1
src/app/ui 0 100 0 0  
app.tsx 0 100 0 0 1-17
index.ts 0 100 0 0 1
src/app/ui/layouts 0 100 0 0  
index.ts 0 100 0 0 1
screen-layout.tsx 0 100 0 0 1-5
src/app/ui/routing 0 100 0 0  
index.ts 0 100 0 0 1
router.tsx 0 100 100 0 1-14
src/entities/branding 100 100 100 100  
index.ts 100 100 100 100  
src/entities/branding/ui 100 100 100 100  
logo.tsx 100 100 100 100  
src/entities/map/lib/controls 0 0 0 0  
index.ts 0 100 0 0 1-2
map-draw-control.tsx 0 0 0 0 1-75
map-draw-styles.ts 0 100 100 0 1-126
use-map-draw.tsx 0 100 0 0 1-8
src/entities/map/lib/provider 0 100 0 0  
index.ts 0 100 0 0 1
map-provider.tsx 0 100 0 0 1-38
src/entities/navigation 100 100 100 100  
index.ts 100 100 100 100  
src/entities/navigation/lib 100 100 100 100  
paths.ts 100 100 100 100  
src/features/citation 0 100 0 0  
index.ts 0 100 0 0 1-4
src/features/citation/lib 100 100 100 100  
constants.ts 100 100 100 100  
index.ts 100 100 100 100  
src/features/citation/ui 78.57 0 71.42 76.92  
citation-data-category-selection.tsx 100 100 100 100  
citation-data-filter.tsx 100 100 100 100  
citation-data-insights.tsx 0 0 0 0 1-36
citation-date-presets-selection.tsx 100 100 100 100  
src/features/geocoder 0 100 0 0  
index.ts 0 100 0 0 1-5
src/features/geocoder/api 0 0 0 0  
endpoints.ts 0 0 0 0 1-33
index.ts 0 100 100 0 1
requests.ts 0 0 0 0 1-7
src/features/geocoder/lib 0 0 0 0  
constants.ts 0 0 0 0 1-23
utilities.ts 0 0 0 0 1-28
src/features/geocoder/ui 0 0 0 0  
geocoder-result-header.tsx 0 100 0 0 1-4
geocoder-result.tsx 0 100 0 0 1-26
geocoder.tsx 0 0 0 0 1-79
region-types-selection.tsx 0 100 0 0 1-14
search-mode-toggle-button.tsx 0 100 0 0 1-8
src/features/instructions 77.77 100 50 87.5  
how-it-works-button.tsx 100 100 100 100  
index.ts 0 100 0 0 1
src/features/map 0 100 0 0  
index.ts 0 100 0 0 1-5
src/features/map/ui 0 0 0 0  
map.tsx 0 0 0 0 1-60
use-map.tsx 0 0 0 0 1-9
src/features/map/ui/draw 0 0 0 0  
map-draw-action-button.tsx 0 100 0 0 1-6
map-draw-apply-button.tsx 0 0 0 0 1-17
map-draw-button.tsx 0 0 0 0 1-21
map-draw-clear-button.tsx 0 0 0 0 1-24
map-draw-instructions.tsx 0 100 0 0 1-17
src/pages 0 0 0 0  
index.ts 0 100 0 0 1
page.tsx 0 100 0 0 2-7
parking-insights-page.tsx 0 0 0 0 1-35
src/shared/data 0 100 0 0  
index.ts 0 100 0 0 1-2
src/shared/data/feature-collections 0 100 100 0  
index.ts 0 100 100 0 1-5
src/shared/data/store 0 100 0 0  
index.ts 0 100 0 0 1-4
store.ts 0 100 100 0 1-14
ui-slice.ts 0 100 0 0 3-45
src/shared/lib/constants 100 100 100 100  
date.ts 100 100 100 100  
src/shared/lib/types 0 100 100 0  
index.ts 0 100 100 0 1
src/shared/lib/utilities 31.03 0 16.66 25  
date.ts 50 0 33.33 35.71 5-15,22-25
enum.ts 0 100 0 0 1-5
string.ts 0 0 0 0 1-4
src/shared/lib/utilities/testing 100 50 100 100  
index.ts 100 100 100 100  
test-wrapper.tsx 100 0 100 100 11
testing.tsx 100 66.66 100 100 6
src/shared/ui/date-input 100 100 100 100  
date-input.tsx 100 100 100 100  
index.ts 100 100 100 100  
src/shared/ui/fake-input 0 100 0 0  
fake-input.tsx 0 100 0 0 2-14
index.ts 0 100 0 0 1
src/shared/ui/visualization 0 100 0 0  
index.ts 0 100 0 0 1
visualization-stub.tsx 0 100 0 0 1-2
src/widgets/citation 0 100 0 0  
index.ts 0 100 0 0 1
src/widgets/citation/ui/explorer 0 0 0 0  
citation-explorer-divider.tsx 0 100 0 0 1-2
citation-explorer-section-title.tsx 0 100 0 0 3-4
citation-explorer-section.tsx 0 100 0 0 3-4
citation-explorer-title.tsx 0 0 0 0 2-12
citation-explorer.tsx 0 0 0 0 1-63
src/widgets/citation/ui/search 0 0 0 0  
comparative-search.tsx 0 0 0 0 1-86
draw-search.tsx 0 100 0 0 1-10
single-seach.tsx 0 100 0 0 1-16
src/widgets/citation/ui/visualization 0 0 0 0  
comparative-search-visualization-focused.tsx 0 100 0 0 1-29
comparative-search-visualization.tsx 0 0 0 0 1-39
single-search-visualization.tsx 0 100 0 0 1-32
src/widgets/header 75 100 50 85.71  
header.tsx 100 100 100 100  
index.ts 0 100 0 0 1
src/widgets/radius-tool 68.57 22.22 42.85 77.41  
index.ts 0 100 0 0 1
radius-tool.tsx 72.72 22.22 50 80 27-31,35,54
src/widgets/radius-tool/utils 54.05 50 43.75 54.05  
formatDecimals.ts 100 100 100 100  
unit-convertor.ts 48.48 40 40 48.48 18-23,30-34,40,71-107

Checklist

netlify[bot] commented 9 months ago

Deploy Preview for lucky-parking-staging-storybook ready!

Name Link
Latest commit 9f9f19e94ab9f8ddc1f63fb1b17d85cf8e1a9db0
Latest deploy log https://app.netlify.com/sites/lucky-parking-staging-storybook/deploys/65628c925d58540008984573
Deploy Preview https://deploy-preview-603--lucky-parking-staging-storybook.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 9 months ago

Deploy Preview for lucky-parking-staging ready!

Name Link
Latest commit 9f9f19e94ab9f8ddc1f63fb1b17d85cf8e1a9db0
Latest deploy log https://app.netlify.com/sites/lucky-parking-staging/deploys/65628c924252fb0008affb6e
Deploy Preview https://deploy-preview-603--lucky-parking-staging.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

glenflorendo commented 9 months ago

@christianjro Feel free to check off I have updated our documentation, accordingly. even if you haven't done anything. If the documentation requires updates, then we should do it. Otherwise, checking it off tells me that there's nothing to update.