Skip to content

Commit aa13b49

Browse files
authored
Merge pull request #406 from openedx/KristinAoki/fix-accessibility-page-link-env-variable
fix: variable name for the accessibility link
2 parents 62bf038 + cff78e0 commit aa13b49

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ TERMS_OF_SERVICE_URL=null
1212
PRIVACY_POLICY_URL=null
1313
SUPPORT_EMAIL=null
1414
STUDIO_BASE_URL=http://localhost:18010
15-
SHOW_ACCESSIBILITY_PAGE=false
15+
ENABLE_ACCESSIBILITY_PAGE=false
1616
ORDER_HISTORY_URL=localhost:1996/orders
1717
REFRESH_ACCESS_TOKEN_ENDPOINT=http://localhost:18000/login_refresh
1818
SEGMENT_KEY=null

src/components/studio-footer/StudioFooter.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ensureConfig([
2222
'SUPPORT_EMAIL',
2323
'SITE_NAME',
2424
'STUDIO_BASE_URL',
25-
'SHOW_ACCESSIBILITY_PAGE',
25+
'ENABLE_ACCESSIBILITY_PAGE',
2626
], 'Studio Footer component');
2727

2828
const StudioFooter = ({
@@ -105,7 +105,7 @@ const StudioFooter = ({
105105
{intl.formatMessage(messages.privacyPolicyLinkLabel)}
106106
</Hyperlink>
107107
)}
108-
{config.SHOW_ACCESSIBILITY_PAGE === 'true' && (
108+
{config.ENABLE_ACCESSIBILITY_PAGE === 'true' && (
109109
<Hyperlink
110110
destination={`${config.STUDIO_BASE_URL}/accessibility`}
111111
data-testid="accessibilityRequest"

src/components/studio-footer/StudioFooter.test.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const config = {
1515
SUPPORT_EMAIL: process.env.SUPPORT_EMAIL,
1616
SITE_NAME: process.env.SITE_NAME,
1717
STUDIO_BASE_URL: process.env.STUDIO_BASE_URL,
18-
SHOW_ACCESSIBILITY_PAGE: process.env.SHOW_ACCESSIBILITY_PAGE,
18+
ENABLE_ACCESSIBILITY_PAGE: process.env.ENABLE_ACCESSIBILITY_PAGE,
1919
};
2020

2121
let currentConfig = config;
@@ -111,7 +111,7 @@ describe('Footer', () => {
111111
expect(screen.queryByTestId('accessibilityRequest')).toBeNull();
112112
});
113113
it('should show accessibilty request link', () => {
114-
render(<Component updateVariable={['SHOW_ACCESSIBILITY_PAGE', 'true']} />);
114+
render(<Component updateVariable={['ENABLE_ACCESSIBILITY_PAGE', 'true']} />);
115115
expect(screen.getByText('LMS')).toBeVisible();
116116
expect(screen.queryByTestId('termsOfService')).toBeNull();
117117
expect(screen.queryByTestId('privacyPolicy')).toBeNull();

src/setupTest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ process.env.LOGO_URL = 'https://edx-cdn.org/v3/default/logo.svg';
1919
process.env.LOGO_TRADEMARK_URL = 'https://edx-cdn.org/v3/default/logo-trademark.svg';
2020
process.env.LOGO_WHITE_URL = 'https://edx-cdn.org/v3/default/logo-white.svg';
2121
process.env.FAVICON_URL = 'https://edx-cdn.org/v3/default/favicon.ico';
22+
process.env.ENABLE_ACCESSIBILITY_PAGE = 'false';

0 commit comments

Comments
 (0)