Skip to content

Commit

Permalink
fix: change ModalHeader to use h2
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian-Holland committed Jun 24, 2024
1 parent ab4f232 commit 0125ca6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/components/FeedbackButton/FeedbackButton.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('<FeedbackButton />', () => {

const feedbackModal = await findByRole('dialog');

const heading = within(feedbackModal).getByRole('heading', { level: 5 });
const heading = within(feedbackModal).getByRole('heading', { level: 2 });
expect(heading.textContent).toEqual('Give Feedback');

const ratingSubtitle = within(feedbackModal).getByText(
Expand Down Expand Up @@ -129,7 +129,7 @@ describe('<FeedbackButton />', () => {

const feedbackModal = await findByRole('dialog');

const heading = within(feedbackModal).getByRole('heading', { level: 5 });
const heading = within(feedbackModal).getByRole('heading', { level: 2 });
expect(heading.textContent).toEqual('Give Feedback2');

const ratingSubtitle = within(feedbackModal).getByText(
Expand Down Expand Up @@ -217,7 +217,7 @@ describe('<FeedbackButton />', () => {

const feedbackModal = await findByRole('dialog');

const heading = within(feedbackModal).getByRole('heading', { level: 5 });
const heading = within(feedbackModal).getByRole('heading', { level: 2 });
expect(heading.textContent).toEqual('Give Feedback');

const feedbackModalRating = within(feedbackModal).getByTestId('feedback-modal-rating');
Expand Down Expand Up @@ -293,7 +293,7 @@ describe('<FeedbackButton />', () => {

const feedbackModal = await findByRole('dialog');

const heading = within(feedbackModal).getByRole('heading', { level: 5 });
const heading = within(feedbackModal).getByRole('heading', { level: 2 });
expect(heading.textContent).toEqual('Give Feedback');

within(feedbackModal).getByText('How could we improve the way this works for you?');
Expand Down Expand Up @@ -346,7 +346,7 @@ describe('<FeedbackButton />', () => {

const feedbackModal = await findByRole('dialog');

const heading = within(feedbackModal).getByRole('heading', { level: 5 });
const heading = within(feedbackModal).getByRole('heading', { level: 2 });
expect(heading.textContent).toEqual('Give Feedback');

within(feedbackModal).getByText('How could we improve the way this works for you?');
Expand Down
5 changes: 4 additions & 1 deletion src/components/Modal/ModalHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { ModalHeader } from 'reactstrap';
import React from 'react';
import { ModalHeader as RsModalHeader } from 'reactstrap';

const ModalHeader = ({ ...props }) => <RsModalHeader tag="h2" {...props} />;

export default ModalHeader;

0 comments on commit 0125ca6

Please sign in to comment.