Skip to content

Commit

Permalink
feat(ui): Updates schema to reflect correct casing (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbolt authored Jan 17, 2025
1 parent 1a0e238 commit 4a6f3cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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

0 comments on commit 4a6f3cb

Please sign in to comment.