feat: updating help buttons links and texts (#535)
This commit is contained in:
committed by
GitHub
parent
281b817084
commit
db201af910
@@ -16,32 +16,18 @@ ensureConfig([
|
||||
const BUTTONS = [
|
||||
{
|
||||
as: 'a',
|
||||
href: 'https://docs.openedx.org/',
|
||||
href: 'https://docs.openedx.org/en/latest/educators/quickstarts/build_a_course.html',
|
||||
size: 'sm',
|
||||
message: messages.edxDocumentationButtonLabel,
|
||||
message: messages.educatorsDocsButtonLabel,
|
||||
dataTestid: null,
|
||||
},
|
||||
{
|
||||
as: 'a',
|
||||
href: 'https://openedx.org/',
|
||||
href: 'https://sandbox.openedx.org/courses/course-v1:OpenedX+01-2024+2024-1/about',
|
||||
size: 'sm',
|
||||
message: messages.openEdxPortalButtonLabel,
|
||||
dataTestid: 'openEdXPortalButton',
|
||||
},
|
||||
{
|
||||
as: 'a',
|
||||
href: 'https://www.edx.org/course/edx101-overview-of-creating-an-edx-course#.VO4eaLPF-n1',
|
||||
size: 'sm',
|
||||
message: messages.edx101ButtonLabel,
|
||||
message: messages.openEdxDemoCourseButtonLabel,
|
||||
dataTestid: 'openEdXDemoCourseButton',
|
||||
},
|
||||
{
|
||||
as: 'a',
|
||||
href: 'https://www.edx.org/course/studiox-creating-a-course-with-edx-studio',
|
||||
size: 'sm',
|
||||
message: messages.studioXButtonLabel,
|
||||
dataTestid: null,
|
||||
},
|
||||
];
|
||||
|
||||
const HelpContent = () => {
|
||||
|
||||
@@ -28,8 +28,8 @@ describe('HelpContent', () => {
|
||||
it('renders all help buttons', () => {
|
||||
const config = { SUPPORT_EMAIL: 'support@example.com' };
|
||||
render(<ContentWithContext config={config} />);
|
||||
expect(screen.getByText(messages.edxDocumentationButtonLabel.defaultMessage)).toBeInTheDocument();
|
||||
expect(screen.getByText(messages.edx101ButtonLabel.defaultMessage)).toBeInTheDocument();
|
||||
expect(screen.getByText(messages.educatorsDocsButtonLabel.defaultMessage)).toBeInTheDocument();
|
||||
expect(screen.getByText(messages.openEdxDemoCourseButtonLabel.defaultMessage)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('does not render contact button if SUPPORT_EMAIL is empty', () => {
|
||||
|
||||
@@ -11,25 +11,15 @@ const messages = defineMessages({
|
||||
defaultMessage: 'Hide Studio help',
|
||||
description: 'Label for button that closes the collapsed section with help buttons',
|
||||
},
|
||||
edxDocumentationButtonLabel: {
|
||||
id: 'authoring.footer.help.edxDocumentation.button.label',
|
||||
defaultMessage: 'edX documentation',
|
||||
description: 'Label for button that links to the edX documentation site',
|
||||
educatorsDocsButtonLabel: {
|
||||
id: 'authoring.footer.help.educatorsDocs.button.label',
|
||||
defaultMessage: 'Open edX Educators Docs',
|
||||
description: 'Label for button that links to the build a course quickstart site',
|
||||
},
|
||||
openEdxPortalButtonLabel: {
|
||||
id: 'authoring.footer.help.openEdxPortal.button.label',
|
||||
defaultMessage: 'Open edX portal',
|
||||
description: 'Label for button that links to the Open edX portal',
|
||||
},
|
||||
edx101ButtonLabel: {
|
||||
id: 'authoring.footer.help.edx101.button.label',
|
||||
defaultMessage: 'Enroll in edX 101',
|
||||
description: 'Label for button that links to the edX 101 course',
|
||||
},
|
||||
studioXButtonLabel: {
|
||||
id: 'authoring.footer.help.studioX.button.label',
|
||||
defaultMessage: 'Enroll in StudioX',
|
||||
description: 'Label for button that links to the edX StudioX course',
|
||||
openEdxDemoCourseButtonLabel: {
|
||||
id: 'authoring.footer.help.openEdxDemoCourse.button.label',
|
||||
defaultMessage: 'Open edX Demo Course',
|
||||
description: 'Label for button that links to the open edX demo course portal',
|
||||
},
|
||||
contactUsButtonLabel: {
|
||||
id: 'authoring.footer.help.contactUs.button.label',
|
||||
|
||||
Reference in New Issue
Block a user