-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e83566f
commit 4ee7a5e
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,62 @@ describe("SubmissionsTable renders as expected", () => { | |
expect(getByText("Email Applications")).toBeInTheDocument(); | ||
}); | ||
|
||
test("renders the session ids", () => { | ||
const { getByText } = setup( | ||
<SubmissionsTable applications={mockApplications} />, | ||
); | ||
|
||
mockApplications.forEach((app) => { | ||
expect(getByText(app.sessionId)).toBeInTheDocument(); | ||
}); | ||
}); | ||
|
||
test("renders payment request ids when available", () => { | ||
const { getByText } = setup( | ||
<SubmissionsTable applications={mockApplications} />, | ||
); | ||
|
||
expect(getByText(/test-payment-request-2/)).toBeInTheDocument(); | ||
expect(getByText(/test-payment-request-1/)).toBeInTheDocument(); | ||
}); | ||
|
||
test("renders the latest payment status for each session", () => { | ||
const { getAllByText } = setup( | ||
<SubmissionsTable applications={mockApplications} />, | ||
); | ||
|
||
expect(getAllByText(/Status: created/)).toHaveLength(3); | ||
expect(getAllByText(/Status: error/)).toHaveLength(1); | ||
expect(getAllByText(/Status: success/)).toHaveLength(2); | ||
}); | ||
|
||
test("renders bops application ids when available", () => { | ||
const { getByText } = setup( | ||
<SubmissionsTable applications={mockApplications} />, | ||
); | ||
|
||
expect(getByText(/test-bops-1/)).toBeInTheDocument(); | ||
}); | ||
|
||
test("renders uniform application ids when available", () => { | ||
const { getByText } = setup( | ||
<SubmissionsTable applications={mockApplications} />, | ||
); | ||
|
||
expect(getByText(/test-uniform-1/)).toBeInTheDocument(); | ||
expect(getByText(/test-uniform-2/)).toBeInTheDocument(); | ||
}); | ||
|
||
test("renders email application recipients when available", () => { | ||
const { getByText } = setup( | ||
<SubmissionsTable applications={mockApplications} />, | ||
); | ||
|
||
expect(getByText(/[email protected]/)).toBeInTheDocument(); | ||
expect(getByText(/[email protected]/)).toBeInTheDocument(); | ||
expect(getByText(/[email protected]/)).toBeInTheDocument(); | ||
}); | ||
|
||
test("renders with no accessibility violations", async () => { | ||
const { container } = setup( | ||
<SubmissionsTable applications={mockApplications} />, | ||
|