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(ui): Updates schema to reflect correct casing #1033

Merged
merged 4 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { screen } from "@testing-library/react";
import { describe, expect, beforeAll, test } from "vitest";
import { RespondToRaiChip } from "@/features/forms/post-submission/respond-to-rai";
import { formSchemas } from "@/formSchemas";
import { renderFormWithPackageSectionAsync } from "@/utils/test-helpers/renderForm";
import { skipCleanup } from "@/utils/test-helpers/skipCleanup";
import { uploadFiles } from "@/utils/test-helpers/uploadFiles";
import { formSchemas } from "@/formSchemas";
import { screen } from "@testing-library/react";
import { EXISTING_ITEM_PENDING_ID } from "mocks";
import { beforeAll, describe, expect, test } from "vitest";

const upload = uploadFiles<(typeof formSchemas)["respond-to-rai-chip"]>();

Expand All @@ -15,12 +15,12 @@ describe("Respond To RAI CHIP", () => {
await renderFormWithPackageSectionAsync(<RespondToRaiChip />, EXISTING_ITEM_PENDING_ID);
});

test("REVISED AMENDED STATE PLAN LANGUAGE", async () => {
test("revised amended state plan language", async () => {
const revisedAmendedStatePlanLanguageLabel = await upload("revisedAmendedStatePlanLanguage");
expect(revisedAmendedStatePlanLanguageLabel).not.toHaveClass("text-destructive");
});

test("OFFICIAL RAI RESPONSE", async () => {
test("official RAI response", async () => {
const officialRAIResponseLabel = await upload("officialRAIResponse");
expect(officialRAIResponseLabel).not.toHaveClass("text-destructive");
});
Expand Down
4 changes: 2 additions & 2 deletions react-app/src/formSchemas/respond-to-rai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export const formSchemaMedicaid = events["respond-to-rai"].baseSchema.extend({
export const formSchemaChip = events["respond-to-rai"].baseSchema.extend({
attachments: events["respond-to-rai"].chipSpaAttachments.extend({
revisedAmendedStatePlanLanguage: z.object({
label: z.string().default("REVISED AMENDED STATE PLAN LANGUAGE"),
label: z.string().default("Revised Amended State Plan Language"),
files: attachmentArraySchema(),
}),
officialRAIResponse: z.object({
label: z.string().default("OFFICIAL RAI RESPONSE"),
label: z.string().default("Official RAI Response"),
files: attachmentArraySchema(),
}),
}),
Expand Down
Loading