From 1e339c1815bc8a7e4bf595eef9b2fc0284490bb6 Mon Sep 17 00:00:00 2001 From: "artur.filippovskii" Date: Mon, 1 Dec 2025 11:20:17 +0200 Subject: [PATCH 1/2] feat: Certificate Status marked up as a heading level 2 --- src/course-home/progress-tab/ProgressTab.test.jsx | 6 ++++++ .../progress-tab/certificate-status/CertificateStatus.jsx | 2 +- webpack.dev-tutor.config.js | 0 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 webpack.dev-tutor.config.js diff --git a/src/course-home/progress-tab/ProgressTab.test.jsx b/src/course-home/progress-tab/ProgressTab.test.jsx index be99cab11d..72627e6d42 100644 --- a/src/course-home/progress-tab/ProgressTab.test.jsx +++ b/src/course-home/progress-tab/ProgressTab.test.jsx @@ -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, @@ -1243,6 +1244,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 () => { diff --git a/src/course-home/progress-tab/certificate-status/CertificateStatus.jsx b/src/course-home/progress-tab/certificate-status/CertificateStatus.jsx index bc1cd92039..149dda8480 100644 --- a/src/course-home/progress-tab/certificate-status/CertificateStatus.jsx +++ b/src/course-home/progress-tab/certificate-status/CertificateStatus.jsx @@ -244,7 +244,7 @@ const CertificateStatus = () => {
- + {header}} /> {body} diff --git a/webpack.dev-tutor.config.js b/webpack.dev-tutor.config.js new file mode 100644 index 0000000000..e69de29bb2 From 8106ccb432d00646630cd09a344dad2925b67bc5 Mon Sep 17 00:00:00 2001 From: "artur.filippovskii" Date: Mon, 1 Dec 2025 14:41:36 +0200 Subject: [PATCH 2/2] fix: fix test falls --- src/courseware/course/Course.test.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/courseware/course/Course.test.jsx b/src/courseware/course/Course.test.jsx index 754ff134b5..f6e9040d8f 100644 --- a/src/courseware/course/Course.test.jsx +++ b/src/courseware/course/Course.test.jsx @@ -58,6 +58,10 @@ describe('Course', () => { global.innerWidth = breakpoints.extraLarge.minWidth; }); + beforeEach(() => { + sessionStorage.clear(); + }); + // This was passing when it shouldn't have been because of improper // waitFor use. With the React 18 upgrade it no longer improperly passes // so we are skipping it. See https://github.com/openedx/frontend-app-learning/issues/1669