Skip to content

Commit

Permalink
Add additional test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
amattu2 committed Dec 11, 2024
1 parent ca23aeb commit 579baef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/components/PansBanner/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ describe("Basic Functionality", () => {

describe("Implementation Requirements", () => {
it("should contain the OMB Approval Number", () => {
const { getByTestId } = render(<PansBanner />);
const { container, getByTestId } = render(<PansBanner />);

expect(container.textContent).toContain("OMB No.:");
expect(getByTestId("pans-approval-number")).toHaveTextContent(/0925-7775/);
});

it("should contain the Expiration Date", () => {
const { getByTestId } = render(<PansBanner />);
const { container, getByTestId } = render(<PansBanner />);

expect(container.textContent).toContain("Expiration Date:");
expect(getByTestId("pans-expiration")).toHaveTextContent(/06\/30\/2025/);
});

Expand Down
4 changes: 2 additions & 2 deletions src/components/PansBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const StyledContent = styled(Typography)({
*
* @returns {React.FC}
*/
const PANSBanner: React.FC = (): React.ReactNode => (
const PansBanner: React.FC = (): React.ReactNode => (
<StyledBox>
<StyledHeaderStack>
<StyledApprovalNumber variant="h1" data-testid="pans-approval-number">
Expand Down Expand Up @@ -71,4 +71,4 @@ const PANSBanner: React.FC = (): React.ReactNode => (
</StyledBox>
);

export default memo(PANSBanner);
export default memo(PansBanner);

0 comments on commit 579baef

Please sign in to comment.