Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change ModalHeader to use h2 #1242

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Loading