Skip to content

Commit

Permalink
Merge branch 'master' of github.com:openedx/frontend-app-admin-portal…
Browse files Browse the repository at this point in the history
… into abdullah/remove-table-deprecation
  • Loading branch information
abdullahwaheed committed Jun 30, 2022
2 parents 684d039 + fe99c52 commit 27a16bf
Show file tree
Hide file tree
Showing 25 changed files with 332 additions and 235 deletions.
100 changes: 84 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"@edx/frontend-enterprise-hotjar": "1.2.0",
"@edx/frontend-enterprise-logistration": "2.1.0",
"@edx/frontend-enterprise-utils": "2.1.0",
"@edx/frontend-platform": "2.3.0",
"@edx/paragon": "19.25.3",
"@edx/frontend-platform": "2.4.0",
"@edx/paragon": "20.2.0",
"@fortawesome/fontawesome-svg-core": "1.2.35",
"@fortawesome/free-brands-svg-icons": "5.15.3",
"@fortawesome/free-regular-svg-icons": "5.15.3",
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const AppWrapper = () => {
initializeHotjar({
hotjarId: process.env.HOTJAR_APP_ID,
hotjarVersion: process.env.HOTJAR_VERSION,
hotjarDebug: process.env.HOTJAR_DEBUG,
hotjarDebug: !!process.env.HOTJAR_DEBUG,
});
} catch (error) {
logError(error);
Expand Down
17 changes: 10 additions & 7 deletions src/components/BulkEnrollmentPage/CourseSearchResults.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import userEvent from '@testing-library/user-event';
import thunk from 'redux-thunk';
import { SearchContext, SearchPagination } from '@edx/frontend-enterprise-catalog-search';
import Skeleton from 'react-loading-skeleton';
import { IntlProvider } from '@edx/frontend-platform/i18n';
import { Alert } from '@edx/paragon';

import BulkEnrollContextProvider from './BulkEnrollmentContext';
Expand Down Expand Up @@ -80,13 +81,15 @@ const refinements = {};
// eslint-disable-next-line react/prop-types
const CourseSearchWrapper = ({ value = { refinements }, props = defaultProps }) => (
<Provider store={mockStore()}>
<SearchContext.Provider value={value}>
<BulkEnrollContextProvider>
<BaseCourseSearchResults
{...props}
/>
</BulkEnrollContextProvider>
</SearchContext.Provider>
<IntlProvider locale="en">
<SearchContext.Provider value={value}>
<BulkEnrollContextProvider>
<BaseCourseSearchResults
{...props}
/>
</BulkEnrollContextProvider>
</SearchContext.Provider>
</IntlProvider>
</Provider>
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { screen } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import React from 'react';
import { IntlProvider } from '@edx/frontend-platform/i18n';

import { ADD_COURSES_TITLE, WARNING_ALERT_TITLE_TEXT } from './constants';
import { BulkEnrollContext } from '../BulkEnrollmentContext';
Expand All @@ -25,10 +26,13 @@ const StepperWrapper = (props) => {
emails: [selectedEmails, () => {}],
subscription: [{}, () => {}],
};

return (
<BulkEnrollContext.Provider value={value}>
<AddCoursesStep {...props} />
</BulkEnrollContext.Provider>
<IntlProvider locale="en">
<BulkEnrollContext.Provider value={value}>
<AddCoursesStep {...props} />
</BulkEnrollContext.Provider>
</IntlProvider>
);
};

Expand Down
30 changes: 15 additions & 15 deletions src/components/CodeManagement/tests/ManageCodesTab.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { MemoryRouter } from 'react-router-dom';
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { mount } from 'enzyme';
import { IntlProvider } from '@edx/frontend-platform/i18n';

import ManageCodesTab from '../ManageCodesTab';

Expand Down Expand Up @@ -48,21 +49,20 @@ const initialState = {
const ManageCodesTabWrapper = ({ store, subsidyRequestConfiguration, ...props }) => (
<MemoryRouter>
<Provider store={store}>
<SubsidyRequestsContext.Provider value={{
subsidyRequestConfiguration,
}}
>
<ManageCodesTab
location={{}}
match={{
path: '/test-page',
}}
history={{
replace: () => {},
}}
{...props}
/>
</SubsidyRequestsContext.Provider>
<IntlProvider locale="en">
<SubsidyRequestsContext.Provider value={{ subsidyRequestConfiguration }}>
<ManageCodesTab
location={{}}
match={{
path: '/test-page',
}}
history={{
replace: () => {},
}}
{...props}
/>
</SubsidyRequestsContext.Provider>
</IntlProvider>
</Provider>
</MemoryRouter>
);
Expand Down
Loading

0 comments on commit 27a16bf

Please sign in to comment.