* refactor: rename SiteHeader to Header * build: use frontend-build * fix: ensure that we can handle anonymous users * feat: anonymous header works now Up until now we haven’t had any microfrontends that allowed anonymous usage. The Header was encountering errors rendering in such situations, though it was close. Now it properly shows the Login and Sign Up buttons. * build: bump version of frontend-build
26 lines
1.2 KiB
JavaScript
26 lines
1.2 KiB
JavaScript
/* eslint-disable import/no-extraneous-dependencies */
|
|
|
|
import Enzyme from 'enzyme';
|
|
import Adapter from 'enzyme-adapter-react-16';
|
|
import 'babel-polyfill';
|
|
|
|
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';
|
|
process.env.BASE_URL = 'localhost:1995';
|
|
process.env.CREDENTIALS_BASE_URL = 'http://localhost:18150';
|
|
process.env.CSRF_TOKEN_API_PATH = '/csrf/api/v1/token';
|
|
process.env.ECOMMERCE_BASE_URL = 'http://localhost:18130';
|
|
process.env.LANGUAGE_PREFERENCE_COOKIE_NAME = 'openedx-language-preference';
|
|
process.env.LMS_BASE_URL = 'http://localhost:18000';
|
|
process.env.LOGIN_URL = 'http://localhost:18000/login';
|
|
process.env.LOGOUT_URL = 'http://localhost:18000/login';
|
|
process.env.MARKETING_SITE_BASE_URL = 'http://localhost:18000';
|
|
process.env.ORDER_HISTORY_URL = 'localhost:1996/orders';
|
|
process.env.REFRESH_ACCESS_TOKEN_ENDPOINT = 'http://localhost:18000/login_refresh';
|
|
process.env.SEGMENT_KEY = 'segment_whoa';
|
|
process.env.SITE_NAME = 'edX';
|
|
process.env.USER_INFO_COOKIE_NAME = 'edx-user-info';
|