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

feat: [AsPu-665] Certificate Status marked up as a heading level 2 #1603

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions src/course-home/progress-tab/ProgressTab.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { sendTrackEvent } from '@edx/frontend-platform/analytics';
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
import { breakpoints } from '@openedx/paragon';
import MockAdapter from 'axios-mock-adapter';
import { within } from '@testing-library/react';

import {
fireEvent, initializeMockApp, logUnhandledRequests, render, screen, act,
Expand Down Expand Up @@ -1250,6 +1251,11 @@ describe('Progress Tab', () => {
linkType: 'button',
pageName: 'progress',
});

const certificateStatusComponent = screen.queryByTestId('certificate-status-component');
expect(certificateStatusComponent).toBeInTheDocument();
const headerElement = within(certificateStatusComponent).getByRole('heading', { level: 2 });
expect(headerElement).toBeInTheDocument();
});

it('Displays nothing if audit only', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ const CertificateStatus = () => {
<Card className="bg-light-200 raised-card">
<ProgressCertificateStatusSlot courseId={courseId}>
<div id={`${certCase}_certificate_status`}>
<Card.Header title={header} />
<Card.Header title={<h2>{header}</h2>} />
<Card.Section className="small text-gray-700">
{body}
</Card.Section>
Expand Down