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

feat(package-actions): remove withdraw rai writes from seatool #800

Open
wants to merge 47 commits into
base: main
Choose a base branch
from

Conversation

tiffanyvu
Copy link
Collaborator

@tiffanyvu tiffanyvu commented Oct 1, 2024

Purpose

We are in the process of removing writes to SEA Tool.

Linked Issues to Close

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

Approach

This issue focuses on refactoring the withdraw RAI form to use a more testable, reusable component to be uniform with all package actions. Zod schemas have been refined.

Assorted Notes/Considerations/Learning

There is one line in the component that needs to be unit tested to reach adequate code coverage and may be more involved than we previously expected. Since other components will need to test for the same line, that effort will be continued to be worked on throughout the following sprints.

Copy link
Contributor

github-actions bot commented Oct 1, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 61.69% 4515 / 7318
🔵 Statements 61.36% 4790 / 7806
🔵 Functions 53.99% 1237 / 2291
🔵 Branches 33.4% 876 / 2622
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
lib/lambda/sinkMain.ts 0% 0% 0% 0% 14-18, 17, 19, 21-51, 22-50, 24-46, 25-45, 28-29, 31-38, 40-41, 43-44, 48-49, 53-120, 67-116, 69-115, 74-77, 76, 80, 84-86, 85, 89-108, 91, 93, 95, 95-103, 97-102, 104-105, 107, 110-114, 119, 122-197, 123, 126-130, 127, 129, 132-139, 136-138, 141-195, 142-194, 144, 147-150, 148-149, 153-165, 159-164, 166-177, 175-176, 178-179, 181-187, 186, 189-193, 196, 199-238, 203-236, 205-235, 208-210, 209, 213-214, 217, 217, 219-227, 221-226, 228, 230-234, 237
lib/lambda/package-actions/toggle-rai-response-withdraw/toggle-rai-response-withdraw.test.ts 100% 100% 100% 100%
lib/lambda/package-actions/toggle-rai-response-withdraw/toggle-rai-response-withdraw.ts 80% 100% 100% 80% 46, 48-50
lib/lambda/package-actions/withdraw-rai/withdraw-rai.ts 0% 0% 0% 0% 15, 17-24, 18-23, 26, 28-29, 31-49, 37-48, 51-76, 52-69, 71, 73-75
lib/lambda/submit/submit.ts 0% 0% 0% 0% 8-53, 9-14, 10-13, 16, 19-24, 20-23, 27-32, 28-31, 34-52, 35-40, 42-45, 47-51, 55
lib/lambda/submit/submissionPayloads/index.ts 0% 100% 100% 0% 13-25
lib/lambda/submit/submissionPayloads/toggle-withdraw-rai.ts 0% 0% 0% 0% 10-46, 11, 11, 13-15, 17-19, 18, 22-24, 23, 26-28, 27, 30-36, 38-43, 45
lib/lambda/submit/submissionPayloads/withdraw-rai.ts 0% 0% 0% 0% 10-46, 11, 11, 13-15, 17-19, 18, 22-24, 23, 26-28, 27, 30-36, 38-43, 45
lib/packages/shared-types/events/index.ts 100% 100% 100% 100%
lib/packages/shared-types/events/toggle-withdraw-rai.ts 100% 100% 100% 100%
lib/packages/shared-types/events/withdraw-rai.ts 57.14% 0% 0% 40% 15, 19, 22
lib/packages/shared-types/opensearch/changelog/index.ts 100% 100% 100% 100%
lib/packages/shared-types/opensearch/changelog/transforms/toggle-withdraw-rai.ts 50% 100% 0% 33.33% 3-9, 4-8
lib/packages/shared-types/opensearch/changelog/transforms/withdraw-rai.ts 18.18% 0% 0% 14.28% 3-32, 4-24, 8-21, 14-20, 14-20, 23, 26-31, 4-25, 14-20
lib/packages/shared-types/opensearch/main/index.ts 100% 100% 100% 100%
lib/packages/shared-types/opensearch/main/transforms/toggle-withdraw-rai.ts 40% 0% 0% 50% 6-12, 6-12, 6-12
lib/packages/shared-types/opensearch/main/transforms/withdraw-rai-response.ts 40% 0% 0% 25% 4-17, 5-16
lib/packages/shared-utils/package-actions/rules.ts 50% 0% 0% 50% 18-30, 36-42, 48-52, 58-63, 69-74, 80-86, 91-94, 99-101, 106
react-app/src/router.tsx 100% 100% 100% 100%
react-app/src/components/ActionForm/actionForm.utilities.ts 100% 70.96% 100% 100%
react-app/src/components/ActionForm/index.tsx 60% 83.33% 80% 58.97% 153, 159-163, 175-206, 176-178, 180, 183-185, 187-188, 190-194, 196, 198-205, 319-320
react-app/src/components/Form/old-content.tsx 70% 28.57% 40% 70% 18-27, 30-40, 61-98
react-app/src/features/dashboard/Lists/renderCells/index.tsx 25% 0% 0% 30% 9-12, 10, 10-11, 20-26, 29-74, 30, 30, 32
react-app/src/features/forms/post-submission/post-submissions-form.tsx 50% 100% 0% 50% 36-37
react-app/src/features/forms/post-submission/toggle-withdraw-rai/index.tsx 33.33% 100% 0% 33.33% 7, 17, 34, 43
react-app/src/features/forms/post-submission/withdraw-rai/index.test.tsx 100% 50% 100% 100%
react-app/src/features/forms/post-submission/withdraw-rai/index.tsx 100% 100% 100% 100%
react-app/src/features/package/package-actions/index.tsx 20% 0% 0% 20% 9-10, 12-14, 17-27
react-app/src/features/package/package-activity/index.tsx 22.72% 0% 0% 26.31% 32, 80, 112, 112-113, 183, 216, 216-217, 284-324, 285-323, 295, 297, 322, 326, 326, 346
react-app/src/formSchemas/index.ts 100% 100% 100% 100%
react-app/src/formSchemas/toggle-withdraw-rai.ts 100% 100% 100% 100%
react-app/src/formSchemas/withdraw-rai.ts 100% 100% 100% 100%
react-app/src/utils/Utils.test.tsx 97.56% 100% 87.5% 100% 71
Generated in workflow #395 for commit 8d14159 by the Vitest Coverage Report Action

@tiffanyvu tiffanyvu had a problem deploying to feat-rm-withdraw-rai-seatool October 1, 2024 17:46 — with GitHub Actions Failure
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 17:46 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 17:49 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool-kibana October 1, 2024 17:49 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool-app October 1, 2024 17:49 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 17:49 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 17:49 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu had a problem deploying to feat-rm-withdraw-rai-seatool October 1, 2024 17:55 — with GitHub Actions Failure
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 17:55 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 17:58 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool-app October 1, 2024 17:58 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 17:58 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool-kibana October 1, 2024 17:58 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 17:58 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu had a problem deploying to feat-rm-withdraw-rai-seatool October 1, 2024 18:07 — with GitHub Actions Failure
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 18:07 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 18:11 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 18:11 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool-kibana October 1, 2024 18:11 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool-app October 1, 2024 18:11 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 1, 2024 18:11 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 17, 2024 20:21 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 17, 2024 20:21 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu had a problem deploying to feat-rm-withdraw-rai-seatool October 18, 2024 20:50 — with GitHub Actions Failure
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 18, 2024 20:50 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 18, 2024 21:12 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 18, 2024 21:12 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 18, 2024 21:14 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool-app October 18, 2024 21:14 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 18, 2024 21:14 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool-kibana October 18, 2024 21:14 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 18, 2024 21:14 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 22, 2024 20:23 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 22, 2024 20:23 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 22, 2024 20:25 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool-kibana October 22, 2024 20:25 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 22, 2024 20:25 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool-app October 22, 2024 20:25 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 22, 2024 20:25 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 22, 2024 21:42 — with GitHub Actions Inactive
@tiffanyvu tiffanyvu temporarily deployed to feat-rm-withdraw-rai-seatool October 22, 2024 21:42 — with GitHub Actions Inactive
Copy link

codeclimate bot commented Oct 22, 2024

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

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

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

View more on Code Climate.

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

Successfully merging this pull request may close these issues.

2 participants