fix: replace hardcoded edX with platformName in basicBannerTitle message (#2711)

This commit is contained in:
Muhammad Anas
2025-11-28 23:26:00 +05:00
committed by GitHub
parent 0c1554b337
commit f9e09f0601
3 changed files with 4 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ describe('<BasicSection />', () => {
it('shows the page banner if the marketingEnabled is true', () => {
const { getByText, queryAllByText } = render(<RootWrapper {...props} />);
expect(
getByText(messages.basicBannerTitle.defaultMessage),
getByText(`Promoting your course with ${props.platformName}`),
).toBeInTheDocument();
expect(
getByText(messages.basicBannerText.defaultMessage),
@@ -66,7 +66,7 @@ describe('<BasicSection />', () => {
).toBeInTheDocument();
expect(getByText(props.lmsLinkForAboutPage)).toBeInTheDocument();
expect(inviteButton).toBeInTheDocument();
expect(queryAllByText(messages.basicBannerTitle.defaultMessage).length).toBe(0);
expect(queryAllByText(`Promoting your course with ${props.platformName}`).length).toBe(0);
});
it('checks link link to invite', () => {

View File

@@ -84,7 +84,7 @@ const BasicSection = ({
onDismiss={() => setShowPageBanner(false)}
className="align-items-start"
>
<h4 className="text-black">{intl.formatMessage(messages.basicBannerTitle)}</h4>
<h4 className="text-black">{intl.formatMessage(messages.basicBannerTitle, { platformName })}</h4>
<span className="text text-gray-700 text-left">
{intl.formatMessage(messages.basicBannerText)}
</span>

View File

@@ -27,7 +27,7 @@ const messages = defineMessages({
},
basicBannerTitle: {
id: 'course-authoring.schedule.basic.banner.title',
defaultMessage: 'Promoting your course with edX',
defaultMessage: 'Promoting your course with {platformName}',
},
basicBannerText: {
id: 'course-authoring.schedule.basic.banner.text',