Skip to content

Commit

Permalink
added test-id to SponsorsSection and added snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
recondesigns committed Mar 12, 2024
1 parent 891a243 commit 0ee3dce
Show file tree
Hide file tree
Showing 3 changed files with 496 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Partner = {
const isPaidSponsor = (partner: Partner): boolean => partner.type === PARTNER_TYPES.PAID;

const SponsorsSection = () => (
<Container theme="gray">
<Container theme="gray" data-testid="Sponsors Section">
<Heading text="Sponsors" hasTitleUnderline headingLevel={3} />

<Heading text="Corporate Partners" headingLevel={4} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { render } from '@testing-library/react';
import createSnapshotTest from 'test-utils/createSnapshotTest';
import partners from 'common/constants/partners';

import SponsorsSection from '../SponsorsSection';

describe('SponsorsSection', () => {
it('should render', () => {
const { queryByTestId } = render(<SponsorsSection />);
expect(queryByTestId('Sponsors Section')).not.toBeNull();

createSnapshotTest(<SponsorsSection />);
});

it('should render a secure link and image for each partner', () => {
const component = render(<SponsorsSection />);

Expand Down
Loading

0 comments on commit 0ee3dce

Please sign in to comment.