@@ -7,22 +7,60 @@ import MainContainer from '../containers/MainContainer';
77import App from '../components/App' ;
88import SwitchAppDropdown from '../components/SwitchApp' ;
99
10- test ( 'Main Container should render' , ( ) => {
11- render ( < MainContainer /> ) ;
12- screen . debug ( ) ;
10+ // notes: beforeAll? can render in here before then testing
11+ // after render, can check if the element that has been rendered has props of testing data.
12+ // issues with inrtinsic values, possibly typescript issue
13+ // basically it seems like switchappdropdown is expecting a specific type
14+ // but the component itself doesnt seem like it's in ts?
15+
16+ // Instrinsic Attributes type is a built in TS type that represents defualt attributes like id, className, style
17+ // so maybe switchappdropdown needs be assigned a type instead of auto assigned intrinsic?
18+
19+ describe ( 'Tests for components' , ( ) => {
20+ describe ( 'Testing Switchapp' , ( ) => {
21+ let dropdown ;
22+ const props = {
23+ currTab : {
24+ label : 'Testing' ,
25+ value : 12353 ,
26+ } ,
27+ styles : { } ,
28+ options : [ ] ,
29+ } ;
30+ test ( 'Testing' , ( ) => {
31+ render ( < SwitchAppDropdown value = / > ) ;
32+ } ) ;
33+ } ) ;
1334} ) ;
14- // test('App should render', () => {
15- // render(<App />);
16- // screen.debug();
17- // });
18- // test('Switchapp should render', () => {
19- // render(<SwitchAppDropdown />);
20- // screen.debug();
21- // });
2235
23- // test('Test should run, header renders and it has correct stuff', () => {
24- // render(<Header />);
25- // // Extract header
26- // screen.debug();
27- // // allows the DOM to be rendered
28- // });
36+ // return (
37+ // <Select
38+ // className='tab-select-container'
39+ // classNamePrefix='tab-select'
40+ // value={currTab}
41+ // styles={customStyles}
42+ // onChange={(e) => {
43+ // dispatch(setTab(parseInt(e.value, 10)));
44+ // }}
45+ // options={tabsArray}
46+ // />
47+ // );
48+ // describe('LabeledText', () => {
49+ // let text;
50+ // const props = {
51+ // label: 'Mega',
52+ // text: 'Markets',
53+ // };
54+
55+ // beforeAll(() => {
56+ // text = render(<LabeledText {...props} />)
57+
58+ // });
59+
60+ // test('Renders the passed-in text with the label in bold', () => {
61+ // expect(text.getByText("Mega:").nextSibling).toHaveTextContent('Markets');
62+ // expect(text.getByText('Mega:')).toHaveStyle('font-weight: bold')
63+ // });
64+ // console.log('currTab', currTab);
65+ // console.log('customStyles', customStyles);
66+ // console.log('tabsArray', tabsArray);
0 commit comments