diff --git a/src/assets/icons/filled_back_icon.svg b/src/assets/icons/filled_back_icon.svg new file mode 100644 index 000000000..84f69cde7 --- /dev/null +++ b/src/assets/icons/filled_back_icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/src/assets/icons/filled_circular_delete.svg b/src/assets/icons/filled_circular_delete.svg new file mode 100644 index 000000000..2a078cc98 --- /dev/null +++ b/src/assets/icons/filled_circular_delete.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/src/components/CancelApplicationButton/index.test.tsx b/src/components/CancelApplicationButton/index.test.tsx index 4366d3804..09b636522 100644 --- a/src/components/CancelApplicationButton/index.test.tsx +++ b/src/components/CancelApplicationButton/index.test.tsx @@ -19,21 +19,45 @@ const baseAuthCtx: AuthContextState = { }; const baseUser: User = { - _id: "", + _id: "base-user-123", firstName: "", lastName: "", userStatus: "Active", - role: "Submitter", // NOTE: This role has access to the delete button by default + role: "Submitter", IDP: "nih", email: "", studies: null, dataCommons: [], createdAt: "", updateAt: "", - permissions: ["data_submission:view", "data_submission:create"], + permissions: [], notifications: [], }; +const baseApp: Omit = { + _id: "", + status: "New", + createdAt: "", + updatedAt: "", + submittedDate: "", + history: [], + ORCID: "", + applicant: { + applicantID: "applicant-123", + applicantName: "", + applicantEmail: "", + }, + PI: "", + controlledAccess: false, + openAccess: false, + studyAbbreviation: "", + conditional: false, + pendingConditions: [], + programName: "", + programAbbreviation: "", + programDescription: "", +}; + type TestParentProps = { user?: Partial; mocks?: MockedResponse[]; @@ -57,22 +81,103 @@ const TestParent: React.FC = ({ mocks = [], user = {}, children }; describe("Accessibility", () => { - it("should have no violations for the component", async () => { + it("should have no violations for the component (cancel)", async () => { const { container, getByTestId } = render( -