refactor: use appId from constants
This commit is contained in:
committed by
Adolfo R. Brandes
parent
6acbf64a71
commit
4dd5ddcc8b
@@ -7,7 +7,7 @@ import { fireEvent, render } from '@testing-library/react';
|
||||
import { BrowserRouter as Router } from 'react-router-dom';
|
||||
import configureStore from 'redux-mock-store';
|
||||
|
||||
import { testAppId } from '../../../setupTest';
|
||||
import { appId } from '../../../constants';
|
||||
import { registerNewUser } from '../../data/actions';
|
||||
import { FIELDS } from '../../data/constants';
|
||||
import RegistrationPage from '../../RegistrationPage';
|
||||
@@ -30,7 +30,7 @@ const IntlRegistrationPage = injectIntl(RegistrationPage);
|
||||
const mockStore = configureStore();
|
||||
|
||||
describe('ConfigurableRegistrationForm', () => {
|
||||
mergeAppConfig(testAppId, {
|
||||
mergeAppConfig(appId, {
|
||||
PRIVACY_POLICY: 'https://privacy-policy.com',
|
||||
TOS_AND_HONOR_CODE: 'https://tos-and-honot-code.com',
|
||||
});
|
||||
@@ -54,7 +54,7 @@ describe('ConfigurableRegistrationForm', () => {
|
||||
|
||||
const reduxWrapper = children => (
|
||||
<IntlProvider locale="en">
|
||||
<CurrentAppProvider appId={testAppId}>
|
||||
<CurrentAppProvider appId={appId}>
|
||||
<Provider store={store}>{children}</Provider>
|
||||
</CurrentAppProvider>
|
||||
</IntlProvider>
|
||||
@@ -126,7 +126,7 @@ describe('ConfigurableRegistrationForm', () => {
|
||||
};
|
||||
|
||||
describe('Test Configurable Fields', () => {
|
||||
mergeAppConfig(testAppId, {
|
||||
mergeAppConfig(appId, {
|
||||
ENABLE_DYNAMIC_REGISTRATION_FIELDS: true,
|
||||
});
|
||||
|
||||
@@ -201,7 +201,7 @@ describe('ConfigurableRegistrationForm', () => {
|
||||
});
|
||||
|
||||
it('should submit form with fields returned by backend in payload', () => {
|
||||
mergeAppConfig(testAppId, {
|
||||
mergeAppConfig(appId, {
|
||||
ENABLE_DYNAMIC_REGISTRATION_FIELDS: true,
|
||||
});
|
||||
getLocale.mockImplementation(() => ('en-us'));
|
||||
|
||||
@@ -10,7 +10,7 @@ import configureStore from 'redux-mock-store';
|
||||
import {
|
||||
FORBIDDEN_REQUEST, INTERNAL_SERVER_ERROR, TPA_AUTHENTICATION_FAILURE, TPA_SESSION_EXPIRED,
|
||||
} from '../../data/constants';
|
||||
import { testAppId } from '../../../setupTest';
|
||||
import { appId } from '../../../constants';
|
||||
import RegistrationPage from '../../RegistrationPage';
|
||||
import RegistrationFailureMessage from '../RegistrationFailure';
|
||||
|
||||
@@ -41,7 +41,7 @@ jest.mock('react-router-dom', () => {
|
||||
});
|
||||
|
||||
describe('RegistrationFailure', () => {
|
||||
mergeAppConfig(testAppId, {
|
||||
mergeAppConfig(appId, {
|
||||
PRIVACY_POLICY: 'https://privacy-policy.com',
|
||||
TOS_AND_HONOR_CODE: 'https://tos-and-honot-code.com',
|
||||
USER_RETENTION_COOKIE_NAME: 'authn-returning-user',
|
||||
|
||||
@@ -10,7 +10,7 @@ import configureStore from 'redux-mock-store';
|
||||
import {
|
||||
COMPLETE_STATE, LOGIN_PAGE, PENDING_STATE, REGISTER_PAGE,
|
||||
} from '../../../data/constants';
|
||||
import { testAppId } from '../../../setupTest';
|
||||
import { appId } from '../../../constants';
|
||||
import RegistrationPage from '../../RegistrationPage';
|
||||
|
||||
jest.mock('@openedx/frontend-base', () => ({
|
||||
@@ -40,7 +40,7 @@ jest.mock('react-router-dom', () => {
|
||||
});
|
||||
|
||||
describe('ThirdPartyAuth', () => {
|
||||
mergeAppConfig(testAppId, {
|
||||
mergeAppConfig(appId, {
|
||||
PRIVACY_POLICY: 'https://privacy-policy.com',
|
||||
TOS_AND_HONOR_CODE: 'https://tos-and-honot-code.com',
|
||||
USER_RETENTION_COOKIE_NAME: 'authn-returning-user',
|
||||
|
||||
Reference in New Issue
Block a user