Skip to content

Commit b04334d

Browse files
feat: Certificate Status marked up as a heading level 2
1 parent 3cbbb02 commit b04334d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/course-home/progress-tab/ProgressTab.test.jsx

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { sendTrackEvent } from '@edx/frontend-platform/analytics';
55
import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth';
66
import { breakpoints } from '@openedx/paragon';
77
import MockAdapter from 'axios-mock-adapter';
8+
import { within } from '@testing-library/react';
89

910
import {
1011
fireEvent, initializeMockApp, logUnhandledRequests, render, screen, act,
@@ -1250,6 +1251,11 @@ describe('Progress Tab', () => {
12501251
linkType: 'button',
12511252
pageName: 'progress',
12521253
});
1254+
1255+
const certificateStatusComponent = screen.queryByTestId('certificate-status-component');
1256+
expect(certificateStatusComponent).toBeInTheDocument();
1257+
const headerElement = within(certificateStatusComponent).getByRole('heading', { level: 2 });
1258+
expect(headerElement).toBeInTheDocument();
12531259
});
12541260

12551261
it('Displays nothing if audit only', async () => {

src/course-home/progress-tab/certificate-status/CertificateStatus.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ const CertificateStatus = () => {
243243
<Card className="bg-light-200 raised-card">
244244
<ProgressCertificateStatusSlot courseId={courseId}>
245245
<div id={`${certCase}_certificate_status`}>
246-
<Card.Header title={header} />
246+
<Card.Header title={<h2>{header}</h2>} />
247247
<Card.Section className="small text-gray-700">
248248
{body}
249249
</Card.Section>

0 commit comments

Comments
 (0)