File tree Expand file tree Collapse file tree 5 files changed +44
-11
lines changed
shared/state/containers/profile
web/app/containers/profile Expand file tree Collapse file tree 5 files changed +44
-11
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable import/no-extraneous-dependencies */
22// Libraries
3- import React , { useContext } from 'react' ;
3+ import React from 'react' ;
44import { of } from 'rxjs' ;
55import { map , startWith } from 'rxjs/operators' ;
66
Original file line number Diff line number Diff line change 1+ // Library
2+ import React from 'react' ;
3+ import { ApolloProvider } from 'react-apollo' ;
4+ import { createMockClient } from 'mock-apollo-client' ;
5+ import { ThemeProvider } from '@material-ui/styles' ;
6+ import { mount } from 'enzyme' ;
7+
8+ // Theme
9+
10+ // Internal
11+ // import ProfileComponent from '@omega-web-components/profile-box';
12+ import ProfileContainer from '../' ;
13+
14+ // Redux Model
15+ import theme from '../../../common/styles' ;
16+
17+ describe ( 'container <ProfileContainer />' , ( ) => {
18+ let wrapper ;
19+ // let component;
20+ let container ;
21+
22+ beforeEach ( ( ) => {
23+ jest . resetAllMocks ( ) ;
24+
25+ const mockClient = createMockClient ( ) ;
26+
27+ wrapper = mount (
28+ < ApolloProvider client = { mockClient } >
29+ < ThemeProvider theme = { theme } >
30+ < ProfileContainer name = { 'John Doe' } />
31+ </ ThemeProvider >
32+ </ ApolloProvider >
33+ ) ;
34+ container = wrapper . find ( ProfileContainer ) ;
35+ // component = container.find(ProfileComponent);
36+ } ) ;
37+
38+ it ( 'should render both the container and the component ' , ( ) => {
39+ expect ( container . length ) . toBeTruthy ( ) ;
40+ // expect(component.length).toBeTruthy();
41+ } ) ;
42+ } ) ;
Original file line number Diff line number Diff line change 1+ // Library
12import React , { useEffect } from 'react' ;
23import { initialProfileModel , ProfileContext } from './profile.model' ;
34import useProfilePage from '../../../../shared/state/containers/profile/profile-model.hooks' ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11// Library
22import React , { useState } from 'react' ;
3- import { ProfileComponentsEngine } from './profile.components' ;
43
54const ProfileContext = React . createContext ( [ { } , ( ) => { } ] ) ;
65const initialProfileModel = {
@@ -11,9 +10,6 @@ const initialProfileModel = {
1110 libraries : {
1211 React,
1312 } ,
14- components : {
15- ...ProfileComponentsEngine
16- } ,
1713 actions : {
1814 } ,
1915 rules : {
You can’t perform that action at this time.
0 commit comments