Compare commits

...

69 Commits

Author SHA1 Message Date
renovate[bot]
181b9916a0 fix(deps): update dependency ts-jest to v29.1.4 2024-06-03 04:51:17 +00:00
renovate[bot]
22dbec317c fix(deps): update dependency ts-jest to v29.1.3 2024-05-27 11:12:12 +00:00
renovate[bot]
6f15e4dafa fix(deps): update dependency @fortawesome/react-fontawesome to v0.2.2 2024-05-27 07:24:23 +00:00
renovate[bot]
9f5aed3c76 fix(deps): update dependency @fortawesome/react-fontawesome to v0.2.1 2024-05-20 13:16:53 +00:00
renovate[bot]
54bc04b182 chore(deps): update dependency @edx/frontend-platform to v8.0.3 2024-05-20 04:41:57 +00:00
Brian Smith
ea2578fa15 fix!: remove FooterSlot component
BREAKING CHANGE: the `FooterSlot` component will now be provided by `frontend-slot-footer`.
2024-05-14 11:31:03 -03:00
renovate[bot]
5f7fab236d chore(deps): update dependency @openedx/paragon to v22.4.0 2024-05-13 09:24:28 +00:00
renovate[bot]
adf5f6c9a8 chore(deps): update dependency react-router-dom to v6.23.1 2024-05-13 06:20:49 +00:00
renovate[bot]
132b080195 chore(deps): update dependency @edx/frontend-platform to v8.0.2 2024-05-13 04:57:36 +00:00
Brian Smith
0d4ea96874 feat: provide FooterSlot
This allows consuming MFEs to utilize a standardized Frontend
Plugin Framework `PluginSlot` for replacing the footer.
2024-05-09 13:44:51 -03:00
renovate[bot]
8b9f5fa348 chore(deps): update dependency @openedx/paragon to v22.3.2 2024-05-06 06:47:39 +00:00
renovate[bot]
c014e30ca8 chore(deps): update dependency react-router-dom to v6.23.0 2024-04-29 09:52:14 +00:00
renovate[bot]
0e6ab3c358 chore(deps): update dependency @openedx/paragon to v22.3.1 2024-04-29 06:25:16 +00:00
renovate[bot]
7d0a126580 chore(deps): update dependency @edx/frontend-platform to v8.0.1 2024-04-29 04:40:18 +00:00
Bilal Qamar
c422ce40be feat: Updated frontend-build to bump jest version to v29 (#317)
* refactor: updated frontend-build to bump jest version to v29

* refactor: updated snapshots

* refactor: updated frontend-build & failing snapshots

* refactor: updated package-lock

* refactor: updated frontend-build to alpha, updated snapshots

* refactor: added overrides to resolve dependency issues

* refactor: updated frontend-build to the version which has eslint alpha synced with master

* feat: updated frontend-build and frontend-platform major versions

* refactor: updated peerDependency as per suggestion
2024-04-23 13:56:59 +05:00
renovate[bot]
7299d5367f chore(deps): update dependency @openedx/paragon to v22.2.2 2024-04-22 10:02:00 +00:00
renovate[bot]
38203b91ba chore(deps): update dependency @edx/frontend-platform to v7.1.4 2024-04-22 06:32:01 +00:00
renovate[bot]
83c340fe08 chore(deps): update dependency @openedx/paragon to v22.2.1 2024-04-15 13:02:17 +00:00
renovate[bot]
9eaebf4b11 chore(deps): update dependency @openedx/frontend-build to v13.1.4 2024-04-15 09:58:34 +00:00
renovate[bot]
2a883857cf chore(deps): update dependency @edx/brand to v1.2.3 2024-04-15 06:41:52 +00:00
renovate[bot]
5f26c1ae93 fix(deps): update font awesome to v6.5.2 2024-04-15 05:16:19 +00:00
Samir Sabri
89ad7234ac feat!: remove Transifex calls for OEP-58 (#355) 2024-03-25 11:23:10 -04:00
renovate[bot]
936915f81f chore(deps): update dependency @edx/frontend-platform to v7.1.3 2024-03-25 12:10:00 +00:00
Bilal Qamar
b993992987 chore(deps): update frontend-platform to v7 (#409) 2024-03-22 11:34:48 +05:00
Adolfo R. Brandes
64fc8adeed build: start releasing alpha packages 2024-03-20 13:09:22 -03:00
Braden MacDonald
a49b06349e fix: invalid frontend-platform import in Footer.jsx (#398) 2024-03-11 17:28:12 +05:00
Kristin Aoki
aa13b4946c Merge pull request #406 from openedx/KristinAoki/fix-accessibility-page-link-env-variable
fix: variable name for the accessibility link
2024-03-08 17:58:12 -05:00
KristinAoki
cff78e021c fix: variable name for the accessibility link 2024-03-08 09:32:55 -05:00
renovate[bot]
62bf038a06 chore(deps): update dependency react-router-dom to v6.21.3 2024-01-22 09:08:36 +00:00
Brian Smith
eed127969d fix: update paragon dep to support v22 (#400) 2024-01-19 11:30:50 -05:00
Brian Smith
dcce076942 fix: update frontend-platform peer dependency (#399)
This updates the `frontend-platform` peer dependency to require a version that has `paragon` in the `openedx` scope as a peer dependency, as opposed to the `edx` scope
2024-01-18 12:59:07 -05:00
Brian Smith
6cf8bf3965 chore!: move paragon to peer dependency using @openedx scope (#394)
BREAKING CHANGE: consuming applications must now provide `paragon` from the `@openedx` scope
2024-01-16 11:06:19 -05:00
renovate[bot]
fad5b0925e chore(deps): update dependency react-router-dom to v6.21.2 2024-01-15 14:16:47 +00:00
renovate[bot]
1f5e5fa4dd chore(deps): update dependency @openedx/frontend-build to v13.0.27 2024-01-15 09:27:37 +00:00
renovate[bot]
a94f57dae2 fix(deps): update dependency @openedx/paragon to v21.13.0 2024-01-01 13:35:46 +00:00
renovate[bot]
531ae4a603 chore(deps): update dependency @edx/frontend-platform to v6.2.0 2024-01-01 09:34:17 +00:00
Mashal Malik
2a2f9ed43f refactor: replace @edx/paragon and @edx/frontend-build (#386) 2024-01-01 13:06:16 +05:00
renovate[bot]
5c0ac3de54 chore(deps): update dependency react-router-dom to v6.21.1 2023-12-25 07:23:00 +00:00
Syed Ali Abbas Zaidi
4aec12eae0 feat: migrate enzyme with RTL (#372)
* feat: migrate enzyme with RTL

* fix: fixed lockfile issues

---------

Co-authored-by: Abdullah Waheed <abdullah.waheed@arbisoft.com>
2023-12-25 12:20:11 +05:00
Asad Ali
5059e0dac1 fix: fix config name from MARKETING_BASE_URL to MARKETING_SITE_BASE_URL (#381) 2023-12-22 18:45:15 +05:00
renovate[bot]
ed5aeb8179 chore(deps): update dependency react-router-dom to v6.21.0 2023-12-18 12:33:17 +00:00
renovate[bot]
19fe6680a9 chore(deps): update dependency @edx/frontend-build to v13.0.14 2023-12-18 09:30:13 +00:00
Peter Kulko
59c78ac479 chore: added start:with-theme npm script (#378) 2023-12-15 11:41:15 +02:00
renovate[bot]
238854bdfb chore(deps): update dependency @edx/frontend-platform to v6.1.2 2023-12-11 19:17:34 +00:00
renovate[bot]
07ad578613 chore(deps): update dependency @edx/frontend-build to v13.0.12 2023-12-11 12:17:05 +00:00
dependabot[bot]
fc3c9581f3 build(deps-dev): bump @adobe/css-tools from 4.3.1 to 4.3.2 (#373)
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-06 13:11:11 +05:00
renovate[bot]
0015b72eb7 fix(deps): update font awesome to v6.5.1 2023-12-04 14:14:17 +00:00
renovate[bot]
f694e322ee chore(deps): update dependency react-router-dom to v6.20.1 2023-12-04 10:33:49 +00:00
renovate[bot]
5e7ac40348 chore(deps): update dependency react-router-dom to v6.20.0 2023-11-27 12:52:56 +00:00
renovate[bot]
c2e5f0f403 chore(deps): update dependency @edx/frontend-platform to v6.1.1 2023-11-27 11:31:56 +00:00
renovate[bot]
d0b9a40f5d chore(deps): update dependency react-router-dom to v6.19.0 2023-11-20 12:22:39 +00:00
renovate[bot]
3f815b386f chore(deps): update dependency @edx/frontend-build to v13.0.8 2023-11-20 10:06:43 +00:00
renovate[bot]
e9bb918925 chore(deps): update actions/checkout action to v4 (#336)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-16 12:21:39 +05:00
renovate[bot]
9b1a3e994a chore(deps): update actions/setup-node action to v4 (#364)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-16 11:44:27 +05:00
Bilal Qamar
7253f9de2b feat: bumped frontend-platform version (#367) 2023-11-15 17:30:54 +05:00
Bilal Qamar
3e6ccb2ea1 Revert "chore: bumped frontend-platform version (#365)" (#366)
This reverts commit 7c3c925838.
2023-11-15 17:11:08 +05:00
Bilal Qamar
7c3c925838 chore: bumped frontend-platform version (#365) 2023-11-15 16:51:39 +05:00
renovate[bot]
cde76129af chore(deps): update dependency @edx/frontend-build to v13.0.5 2023-11-13 10:09:37 +00:00
renovate[bot]
29050d109f chore(deps): update dependency react-router-dom to v6.18.0 2023-11-06 16:36:59 +00:00
renovate[bot]
5caf0ea549 chore(deps): update dependency @edx/frontend-build to v13.0.4 2023-11-06 11:19:32 +00:00
renovate[bot]
3571e5c3ed fix(deps): update dependency @edx/paragon to v21.5.6 2023-10-30 14:35:46 +00:00
renovate[bot]
1011854f51 chore(deps): update dependency react-router-dom to v6.17.0 2023-10-30 09:35:57 +00:00
renovate[bot]
a5859702b5 chore(deps): update dependency @edx/frontend-build to v13.0.3 2023-10-30 07:46:50 +00:00
Bilal Qamar
2b3a13a5a0 chore: bumped frontend-platform version (#356) 2023-10-24 13:58:44 +05:00
Feanil Patel
ca4b4905b7 chore: Update to the new version of brand-openedx in the new scope. (#354)
Part of https://github.com/openedx/axim-engineering/issues/23

This updates the `@edx/brand` alias to point to the `brand-openedx` package at
the `openedx` scope. This does not impact imports because this package is used
via an alias.
2023-10-20 17:17:37 -04:00
dependabot[bot]
c7e42fda3d build(deps-dev): bump @babel/traverse from 7.22.5 to 7.23.2 (#353)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.5 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 16:46:23 +05:00
Bilal Qamar
2266486398 feat: bumped frontend-platform to v6 (#352) 2023-10-18 16:05:49 +05:00
renovate[bot]
91cd859ffc chore(deps): update dependency @edx/frontend-platform to v5.6.1 2023-10-16 12:39:08 +00:00
renovate[bot]
c5e8a12f89 chore(deps): update dependency @testing-library/jest-dom to v5.17.0 2023-10-16 11:17:40 +00:00
38 changed files with 6063 additions and 11486 deletions

View File

@@ -12,7 +12,7 @@ TERMS_OF_SERVICE_URL=null
PRIVACY_POLICY_URL=null
SUPPORT_EMAIL=null
STUDIO_BASE_URL=http://localhost:18010
SHOW_ACCESSIBILITY_PAGE=false
ENABLE_ACCESSIBILITY_PAGE=false
ORDER_HISTORY_URL=localhost:1996/orders
REFRESH_ACCESS_TOKEN_ENDPOINT=http://localhost:18000/login_refresh
SEGMENT_KEY=null

View File

@@ -1,4 +1,4 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const { createConfig } = require('@edx/frontend-build');
const { createConfig } = require('@openedx/frontend-build');
module.exports = createConfig('eslint');

View File

@@ -11,13 +11,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- name: Setup Nodejs
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VER }}
- name: Install dependencies

View File

@@ -3,19 +3,20 @@ on:
push:
branches:
- master
- alpha
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Nodejs Env
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VER }}
- name: Install dependencies

1
.gitignore vendored
View File

@@ -10,3 +10,4 @@ src/i18n/transifex_input.json
temp/babel-plugin-react-intl
/.vscode
module.config.js
src/i18n/messages

View File

@@ -1,5 +1,8 @@
{
"branch": "master",
"branches": [
"master",
{name: "alpha", prerelease: true}
],
"tagFormat": "v${version}",
"verifyConditions": [
"@semantic-release/npm",

View File

@@ -1,9 +0,0 @@
[main]
host = https://www.transifex.com
[o:open-edx:p:edx-platform:r:frontend-component-footer]
file_filter = src/i18n/messages/<lang>.json
source_file = src/i18n/transifex_input.json
source_lang = en
type = KEYVALUEJSON

View File

@@ -1,6 +1,3 @@
export TRANSIFEX_RESOURCE = frontend-component-footer
transifex_langs = "ar,fr,es_419,zh_CN,pt,it,de,uk,ru,hi,fr_CA,it_IT,pt_PT,de_DE"
transifex_utils = ./node_modules/.bin/transifex-utils.js
i18n = ./src/i18n
transifex_input = $(i18n)/transifex_input.json
@@ -35,20 +32,6 @@ detect_changed_source_translations:
# Checking for changed translations...
git diff --exit-code $(i18n)
# Pushes translations to Transifex. You must run make extract_translations first.
push_translations:
# Pushing strings to Transifex...
tx push -s
# Fetching hashes from Transifex...
./node_modules/@edx/reactifex/bash_scripts/get_hashed_strings_v3.sh
# Writing out comments to file...
$(transifex_utils) $(transifex_temp) --comments --v3-scripts-path
# Pushing comments to Transifex...
./node_modules/@edx/reactifex/bash_scripts/put_comments_v3.sh
# Pulls translations from Transifex.
pull_translations:
tx pull -t -f --mode reviewed --languages=$(transifex_langs)
# This target is used by Travis.
validate-no-uncommitted-package-lock-changes:

View File

@@ -93,6 +93,12 @@ This library has the following exports:
language from its dropdown.
* supportedLanguages: An array of objects representing available languages. See example below for object shape.
Plugin
======
The footer can be replaced using using `Frontend Plugin Framework <https://github.com/openedx/frontend-plugin-framework>`_.
Information on how to utilize the ``FooterSlot`` component to do so is available in the `frontend-slot-footer repository <https://github.com/openedx/frontend-slot-footer/>`_.
Examples
========
@@ -113,6 +119,8 @@ Component Usage Example::
* `An example of minimal component and messages usage. <https://github.com/openedx/frontend-template-application/blob/3355bb3a96232390e9056f35b06ffa8f105ed7ca/src/index.jsx#L23>`_
* `An example of SCSS file usage. <https://github.com/openedx/frontend-template-application/blob/3cd5485bf387b8c479baf6b02bf59e3061dc3465/src/index.scss#L9>`_
Development
===========

View File

@@ -1,3 +1,3 @@
const { createConfig } = require('@edx/frontend-build');
const { createConfig } = require('@openedx/frontend-build');
module.exports = createConfig('babel-preserve-modules');

View File

@@ -1,6 +1,6 @@
@import "@edx/brand/paragon/fonts";
@import "@edx/brand/paragon/variables";
@import "@edx/paragon/scss/core/core";
@import "@openedx/paragon/scss/core/core";
@import "@edx/brand/paragon/overrides";
@import "@edx/frontend-component-footer/footer";

View File

@@ -1,4 +1,4 @@
const { createConfig } = require('@edx/frontend-build');
const { createConfig } = require('@openedx/frontend-build');
module.exports = createConfig('jest', {
setupFiles: [

17363
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,8 @@
"lint": "fedx-scripts eslint --ext .js --ext .jsx .",
"snapshot": "fedx-scripts jest --updateSnapshot",
"start": "fedx-scripts webpack-dev-server --progress",
"test": "fedx-scripts jest --coverage"
"start:with-theme": "paragon install-theme && npm start && npm install",
"test": "fedx-scripts jest"
},
"files": [
"/dist"
@@ -33,36 +34,38 @@
},
"homepage": "https://github.com/openedx/frontend-component-footer#readme",
"devDependencies": {
"@edx/brand": "npm:@edx/brand-openedx@1.2.0",
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/browserslist-config": "^1.1.1",
"@edx/frontend-build": "13.0.1",
"@edx/frontend-platform": "5.5.2",
"@edx/frontend-platform": "8.0.3",
"@edx/reactifex": "^2.1.1",
"@openedx/frontend-build": "14.0.3",
"@openedx/frontend-plugin-framework": "^1.1.2",
"@openedx/paragon": "22.4.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^12.1.1",
"@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
"enzyme": "3.11.0",
"husky": "8.0.3",
"prop-types": "15.8.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-redux": "7.2.9",
"react-router-dom": "6.15.0",
"react-router-dom": "6.23.1",
"react-test-renderer": "17.0.2",
"redux": "4.2.1",
"semantic-release": "21.1.2"
},
"dependencies": {
"@edx/paragon": "^21.3.1",
"@fortawesome/fontawesome-svg-core": "6.4.2",
"@fortawesome/free-brands-svg-icons": "6.4.2",
"@fortawesome/free-regular-svg-icons": "6.4.2",
"@fortawesome/free-solid-svg-icons": "6.4.2",
"@fortawesome/react-fontawesome": "0.2.0",
"lodash": "^4.17.21"
"@fortawesome/fontawesome-svg-core": "6.5.2",
"@fortawesome/free-brands-svg-icons": "6.5.2",
"@fortawesome/free-regular-svg-icons": "6.5.2",
"@fortawesome/free-solid-svg-icons": "6.5.2",
"@fortawesome/react-fontawesome": "0.2.2",
"jest-environment-jsdom": "^29.7.0",
"lodash": "^4.17.21",
"ts-jest": "^29.1.2"
},
"peerDependencies": {
"@edx/frontend-platform": "^4.0.0 || ^5.0.0",
"@edx/frontend-platform": "^7.0.0 || ^8.0.0",
"@openedx/paragon": ">= 21.11.3 < 23.0.0",
"prop-types": "^15.5.10",
"react": "^16.9.0 || ^17.0.0",
"react-dom": "^16.9.0 || ^17.0.0"

View File

@@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { sendTrackEvent } from '@edx/frontend-platform/analytics';
import { ensureConfig } from '@edx/frontend-platform/config';
import { ensureConfig } from '@edx/frontend-platform';
import { AppContext } from '@edx/frontend-platform/react';
import messages from './Footer.messages';

View File

@@ -1,7 +1,7 @@
/* eslint-disable react/prop-types */
import React, { useMemo } from 'react';
import renderer from 'react-test-renderer';
import { mount } from 'enzyme';
import { render, fireEvent, screen } from '@testing-library/react';
import { IntlProvider } from '@edx/frontend-platform/i18n';
import { AppContext } from '@edx/frontend-platform/react';
@@ -78,9 +78,9 @@ describe('<Footer />', () => {
describe('handles language switching', () => {
it('calls onLanguageSelected prop when a language is changed', () => {
const mockHandleLanguageSelected = jest.fn();
const wrapper = mount(<FooterWithLanguageSelector languageSelected={mockHandleLanguageSelected} />);
render(<FooterWithLanguageSelector languageSelected={mockHandleLanguageSelected} />);
wrapper.find('form').simulate('submit', {
fireEvent.submit(screen.getByTestId('site-footer-submit-btn'), {
target: {
elements: {
'site-footer-language-select': {

View File

@@ -34,7 +34,7 @@ const LanguageSelector = ({
>
{options.map(({ value, label }) => <option key={value} value={value}>{label}</option>)}
</select>
<button className="btn btn-outline-primary btn-sm" type="submit">
<button data-testid="site-footer-submit-btn" className="btn btn-outline-primary btn-sm" type="submit">
<FormattedMessage
id="footer.languageForm.submit.label"
defaultMessage="Apply"

View File

@@ -17,7 +17,7 @@ exports[`<Footer /> renders correctly renders with a language selector 1`] = `
alt="Powered by Open edX"
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
style={
Object {
{
"maxHeight": 45,
}
}
@@ -58,6 +58,7 @@ exports[`<Footer /> renders correctly renders with a language selector 1`] = `
</select>
<button
className="btn btn-outline-primary btn-sm"
data-testid="site-footer-submit-btn"
type="submit"
>
Apply
@@ -85,7 +86,7 @@ exports[`<Footer /> renders correctly renders without a language selector 1`] =
alt="Powered by Open edX"
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
style={
Object {
{
"maxHeight": 45,
}
}
@@ -115,7 +116,7 @@ exports[`<Footer /> renders correctly renders without a language selector in es
alt="Powered by Open edX"
src="https://edx-cdn.org/v3/default/logo-trademark.svg"
style={
Object {
{
"maxHeight": 45,
}
}

View File

@@ -10,8 +10,8 @@ import {
Hyperlink,
Image,
TransitionReplace,
} from '@edx/paragon';
import { ExpandLess, ExpandMore, Help } from '@edx/paragon/icons';
} from '@openedx/paragon';
import { ExpandLess, ExpandMore, Help } from '@openedx/paragon/icons';
import messages from './messages';
ensureConfig([
@@ -22,7 +22,7 @@ ensureConfig([
'SUPPORT_EMAIL',
'SITE_NAME',
'STUDIO_BASE_URL',
'SHOW_ACCESSIBILITY_PAGE',
'ENABLE_ACCESSIBILITY_PAGE',
], 'Studio Footer component');
const StudioFooter = ({
@@ -94,7 +94,7 @@ const StudioFooter = ({
) : null}
</TransitionReplace>
<ActionRow className="pt-3 m-0 x-small">
© {new Date().getFullYear()} <Hyperlink destination={config.MARKETING_BASE_URL} target="_blank" className="ml-2">{config.SITE_NAME}</Hyperlink>
© {new Date().getFullYear()} <Hyperlink destination={config.MARKETING_SITE_BASE_URL} target="_blank" className="ml-2">{config.SITE_NAME}</Hyperlink>
<ActionRow.Spacer />
{!_.isEmpty(config.TERMS_OF_SERVICE_URL) && (
<Hyperlink destination={config.TERMS_OF_SERVICE_URL} data-testid="termsOfService">
@@ -105,7 +105,7 @@ const StudioFooter = ({
{intl.formatMessage(messages.privacyPolicyLinkLabel)}
</Hyperlink>
)}
{config.SHOW_ACCESSIBILITY_PAGE === 'true' && (
{config.ENABLE_ACCESSIBILITY_PAGE === 'true' && (
<Hyperlink
destination={`${config.STUDIO_BASE_URL}/accessibility`}
data-testid="accessibilityRequest"

View File

@@ -15,7 +15,7 @@ const config = {
SUPPORT_EMAIL: process.env.SUPPORT_EMAIL,
SITE_NAME: process.env.SITE_NAME,
STUDIO_BASE_URL: process.env.STUDIO_BASE_URL,
SHOW_ACCESSIBILITY_PAGE: process.env.SHOW_ACCESSIBILITY_PAGE,
ENABLE_ACCESSIBILITY_PAGE: process.env.ENABLE_ACCESSIBILITY_PAGE,
};
let currentConfig = config;
@@ -41,7 +41,7 @@ const Component = ({ updateVariable }) => {
);
};
jest.unmock('@edx/paragon');
jest.unmock('@openedx/paragon');
describe('Footer', () => {
describe('help section default view', () => {
@@ -111,7 +111,7 @@ describe('Footer', () => {
expect(screen.queryByTestId('accessibilityRequest')).toBeNull();
});
it('should show accessibilty request link', () => {
render(<Component updateVariable={['SHOW_ACCESSIBILITY_PAGE', 'true']} />);
render(<Component updateVariable={['ENABLE_ACCESSIBILITY_PAGE', 'true']} />);
expect(screen.getByText('LMS')).toBeVisible();
expect(screen.queryByTestId('termsOfService')).toBeNull();
expect(screen.queryByTestId('privacyPolicy')).toBeNull();

View File

@@ -1,34 +1 @@
import arMessages from './messages/ar.json';
import frMessages from './messages/fr.json';
import es419Messages from './messages/es_419.json';
import zhcnMessages from './messages/zh_CN.json';
import ptMessages from './messages/pt.json';
import itMessages from './messages/it.json';
import ukMessages from './messages/uk.json';
import deMessages from './messages/de.json';
import ruMessages from './messages/ru.json';
import hiMessages from './messages/hi.json';
import frCAMessages from './messages/fr_CA.json';
import dedeCAMessages from './messages/de_DE.json';
import ititCAMessages from './messages/it_IT.json';
import ptptCAMessages from './messages/pt_PT.json';
// no need to import en messages-- they are in the defaultMessage field
const messages = {
ar: arMessages,
'es-419': es419Messages,
fr: frMessages,
'zh-cn': zhcnMessages,
pt: ptMessages,
it: itMessages,
de: deMessages,
hi: hiMessages,
'fr-ca': frCAMessages,
ru: ruMessages,
uk: ukMessages,
'de-de': dedeCAMessages,
'it-it': ititCAMessages,
'pt-pt': ptptCAMessages,
};
export default messages;
export default {};

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -1 +0,0 @@
{}

View File

@@ -3,4 +3,6 @@ import messages from './i18n/index';
import StudioFooter from './components/studio-footer';
export default Footer;
export { messages, EVENT_NAMES, StudioFooter };
export {
messages, EVENT_NAMES, StudioFooter,
};

View File

@@ -1,8 +1,3 @@
import Enzyme from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
Enzyme.configure({ adapter: new Adapter() });
// These configuration values are usually set in webpack's EnvironmentPlugin however
// Jest does not use webpack so we need to set these so for testing
process.env.ACCESS_TOKEN_COOKIE_NAME = 'edx-jwt-cookie-header-payload';
@@ -24,3 +19,4 @@ process.env.LOGO_URL = 'https://edx-cdn.org/v3/default/logo.svg';
process.env.LOGO_TRADEMARK_URL = 'https://edx-cdn.org/v3/default/logo-trademark.svg';
process.env.LOGO_WHITE_URL = 'https://edx-cdn.org/v3/default/logo-white.svg';
process.env.FAVICON_URL = 'https://edx-cdn.org/v3/default/favicon.ico';
process.env.ENABLE_ACCESSIBILITY_PAGE = 'false';

View File

@@ -1,5 +1,5 @@
const path = require('path');
const { createConfig } = require('@edx/frontend-build');
const { createConfig } = require('@openedx/frontend-build');
module.exports = createConfig('webpack-dev', {
entry: path.resolve(__dirname, 'example'),