Skip to content
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

testing(ui): banner #715

Merged
merged 14 commits into from
Aug 16, 2024
Merged

testing(ui): banner #715

merged 14 commits into from
Aug 16, 2024

Conversation

asharonbaltazar
Copy link
Collaborator

Purpose

To prepare the codebase for the eventual forms revamp and lay the ground for best test practices, I'm making the transition easier by removing our reliance on React-centric logic. AlertContext relied on two things: a Provider and React's rules of hooks, both limiting what we can do when it comes to defining banner.

Linked Issues to Close

https://qmacbis.atlassian.net/browse/OY2-29602

Approach

Please read the approach I took in #713 as it's pretty much the same. I've added one more test to userPrompt to make sure the button texts match whatever the user passed.

@asharonbaltazar
Copy link
Collaborator Author

I've asked QA to test the banners and make sure they all work

Copy link
Contributor

github-actions bot commented Aug 8, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 54.44% 4273 / 7848
🔵 Statements 54.26% 4496 / 8286
🔵 Functions 48.43% 1023 / 2112
🔵 Branches 27.31% 810 / 2965
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
react-app/src/components/Banner/banner.tsx 100% 100% 100% 100%
react-app/src/components/ConfirmationDialog/ConfirmationDialog.tsx 0% 0% 0% 0%
react-app/src/components/ConfirmationDialog/userPrompt.test.tsx 100% 100% 100% 100%
react-app/src/components/ConfirmationDialog/userPrompt.tsx 100% 80% 100% 100%
react-app/src/components/Container/banner.test.tsx 100% 100% 100% 100%
react-app/src/components/Layout/index.tsx 11.36% 0% 0% 12.19% 19-20, 22-24, 23, 27-50, 50, 52, 56, 58-60, 59, 62-64, 63, 66, 66, 120, 176-179, 181-188, 182, 184-187, 190-193, 191-192, 195, 195, 197-200, 198-204, 202-203, 206-244, 290, 290, 301-308
react-app/src/features/package-actions/ActionForm.tsx 4.16% 0% 0% 4.16% 33-35, 37-40, 42-44, 46-48, 47, 50-52, 51, 54, 56-88, 57-87, 58-64, 66-69, 71-75, 77, 79-84, 86, 90-97, 91-96, 92-95, 105-116, 118
react-app/src/features/package-actions/legacy-shared-components.tsx 0% 0% 0% 0% 16-50, 17-19, 21-44, 22, 24-28, 25-27, 26, 30-37, 34-36, 35, 39-43, 46-49, 52-69, 53-55, 57-63, 58-62, 65-68, 71-111, 72-74, 76-110, 77-98, 78-86, 79-85, 88, 90-95, 97, 100-109, 101-108, 114-121, 115-119, 116-118, 117, 120
react-app/src/features/package-actions/lib/contentSwitch.ts 55.55% 0% 0% 62.5% 96-108, 108-110, 110-111
react-app/src/features/package/package-details/appk.tsx 4.34% 0% 0% 4.34% 14-20, 19, 22-52, 23-50, 33-44, 34-43, 47-48, 54-56, 55, 82, 96-97
react-app/src/features/submission/app-k/index.tsx 4.34% 0% 0% 4.54% 19-26, 28-30, 29, 32-65, 33-63, 42-48, 46-47, 49, 51, 53-58, 60, 62, 67, 69-72, 70, 70-71
react-app/src/features/submission/spa/chip-intitial.tsx 14.28% 0% 0% 14.28% 73-75, 77-117, 82-116, 83-88, 90-92, 92, 95, 97, 99-104, 106, 108-115, 153-155, 154
react-app/src/features/submission/spa/medicaid-initial.tsx 14.28% 0% 0% 14.28% 76-82, 84-120, 85-119, 86-91, 93-95, 95, 98, 100, 102-107, 109, 111-118, 155-157, 156
react-app/src/features/submission/waiver/capitated/capitated-1915-b-waiver-amendment.tsx 13.04% 0% 0% 13.04% 72-74, 76-112, 79-111, 80-85, 87-88, 88, 90, 92, 94-99, 101, 103-110, 114-117, 158-160, 159, 196-198, 197
react-app/src/features/submission/waiver/capitated/capitated-1915-b-waiver-initial.tsx 14.28% 0% 0% 14.28% 73-75, 77-113, 80-112, 81-86, 88-89, 89, 91, 93, 95-100, 102, 104-111, 115-118, 172-174, 173
react-app/src/features/submission/waiver/capitated/capitated-1915-b-waiver-renewal.tsx 11.11% 0% 0% 11.11% 47-59, 52-58, 60, 98-100, 102-139, 105-138, 107-112, 114-115, 115, 117, 119, 121-126, 128, 130-137, 141-144, 187-189, 188, 224-226, 225
react-app/src/features/submission/waiver/contracting/contracting-1915-b-waiver-amendment.tsx 13.04% 0% 0% 13.04% 69-71, 73-109, 76-108, 77-82, 84-85, 85, 87, 89, 91-96, 98, 100-107, 111-114, 155-157, 156, 193-195, 194
react-app/src/features/submission/waiver/contracting/contracting-1915-b-waiver-initial.tsx 13.63% 0% 0% 13.63% 66-68, 70-106, 73-105, 74-79, 81-82, 82, 84, 86, 88-93, 95, 97-104, 108-111, 113, 167-169, 168
react-app/src/features/submission/waiver/contracting/contracting-1915-b-waiver-renewal.tsx 11.11% 0% 0% 11.11% 47-59, 52-58, 60, 92-94, 96-133, 99-132, 101-106, 108-109, 109, 111, 113, 115-120, 122, 124-131, 135-138, 182-184, 183, 219-221, 220
react-app/src/utils/basic-observable.ts 100% 100% 100% 100%
react-app/src/utils/location.ts 100% 100% 100% 100%
Generated in workflow #114

Copy link
Collaborator

@13bfrancis 13bfrancis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Let's get it to QE/QA

Copy link

codeclimate bot commented Aug 16, 2024

Code Climate has analyzed commit 1ea0e37 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 60.4% (50% is the threshold).

This pull request will bring the total coverage in the repository to 54.4% (0.6% change).

View more on Code Climate.

Copy link
Contributor

🎉 This PR is included in version 1.5.0-val.74 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants