Skip to content

Commit

Permalink
fix: Test snapshot updated
Browse files Browse the repository at this point in the history
  • Loading branch information
RahatAli authored and RahatAli committed Nov 22, 2023
1 parent 74f837a commit f29e116
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 11 deletions.
9 changes: 8 additions & 1 deletion src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import LanguageSelector from './LanguageSelector';
ensureConfig([
'LMS_BASE_URL',
'LOGO_TRADEMARK_URL',
'SITE_NAME',
], 'Footer component');

const EVENT_NAMES = {
Expand Down Expand Up @@ -61,7 +62,13 @@ class SiteFooter extends React.Component {
/>
</a>
<div className="flex-grow-1" />
<div><p className="copyright m-0">{intl.formatMessage(messages['footer.copyright'])}</p></div>
<div>
<p className="copyright m-0">
{intl.formatMessage(messages['footer.copyright'])}
{` ${config.SITE_NAME} © `}
{intl.formatMessage(messages['footer.copyright.date'])}
</p>
</div>
</div>

<div className="container-fluid d-flex">
Expand Down
7 changes: 6 additions & 1 deletion src/components/Footer.messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,14 @@ const messages = defineMessages({
},
'footer.copyright': {
id: 'footer.copyright',
defaultMessage: 'Copyright © 2023. All rights reserved.',
defaultMessage: 'All rights reserved.',
description: 'copyright text for the footer component',
},
'footer.copyright.date': {
id: 'footer.copyright.date',
defaultMessage: '2023',
description: 'copyright date for the footer component',
},
});

export default messages;
66 changes: 57 additions & 9 deletions src/components/__snapshots__/Footer.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

exports[`<Footer /> renders correctly renders with a language selector 1`] = `
<footer
className="footer d-flex border-top py-3 px-4"
className="footer border-top py-3 px-3"
role="contentinfo"
>
<div
className="container-fluid d-flex"
className="container-fluid d-flex align-items-center mb-3"
>
<a
aria-label="edX Home"
Expand All @@ -18,11 +18,27 @@ exports[`<Footer /> renders correctly renders with a language selector 1`] = `
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
style={
Object {
"maxHeight": 45,
"maxHeight": 63,
}
}
/>
</a>
<div
className="flex-grow-1"
/>
<div>
<p
className="copyright m-0"
>
All rights reserved.
undefined ©
2023
</p>
</div>
</div>
<div
className="container-fluid d-flex"
>
<div
className="flex-grow-1"
/>
Expand Down Expand Up @@ -70,11 +86,11 @@ exports[`<Footer /> renders correctly renders with a language selector 1`] = `

exports[`<Footer /> renders correctly renders without a language selector 1`] = `
<footer
className="footer d-flex border-top py-3 px-4"
className="footer border-top py-3 px-3"
role="contentinfo"
>
<div
className="container-fluid d-flex"
className="container-fluid d-flex align-items-center mb-3"
>
<a
aria-label="edX Home"
Expand All @@ -86,25 +102,41 @@ exports[`<Footer /> renders correctly renders without a language selector 1`] =
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
style={
Object {
"maxHeight": 45,
"maxHeight": 63,
}
}
/>
</a>
<div
className="flex-grow-1"
/>
<div>
<p
className="copyright m-0"
>
All rights reserved.
undefined ©
2023
</p>
</div>
</div>
<div
className="container-fluid d-flex"
>
<div
className="flex-grow-1"
/>
</div>
</footer>
`;

exports[`<Footer /> renders correctly renders without a language selector in es 1`] = `
<footer
className="footer d-flex border-top py-3 px-4"
className="footer border-top py-3 px-3"
role="contentinfo"
>
<div
className="container-fluid d-flex"
className="container-fluid d-flex align-items-center mb-3"
>
<a
aria-label="edX Home"
Expand All @@ -116,14 +148,30 @@ exports[`<Footer /> renders correctly renders without a language selector in es
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
style={
Object {
"maxHeight": 45,
"maxHeight": 63,
}
}
/>
</a>
<div
className="flex-grow-1"
/>
<div>
<p
className="copyright m-0"
>
All rights reserved.
undefined ©
2023
</p>
</div>
</div>
<div
className="container-fluid d-flex"
>
<div
className="flex-grow-1"
/>
</div>
</footer>
`;

0 comments on commit f29e116

Please sign in to comment.