@@ -5,45 +5,11 @@ import { EndpointTestCaseContext } from '../../context/reducers/endpointTestCase
55import { deleteAssertion , updateAssertion } from '../../context/actions/endpointTestCaseActions' ;
66import { GlobalContext } from '../../context/reducers/globalReducer' ;
77import { openBrowserDocs } from '../../context/actions/globalActions' ;
8+ import jestMatchers from './JestMatchers.js' ;
89
910const EndpointAssertion = ( { assertion, index, id } ) => {
1011 const [ , dispatchToEndpointTestCase ] = useContext ( EndpointTestCaseContext ) ;
1112 const [ , dispatchToGlobal ] = useContext ( GlobalContext ) ;
12- const jestMatchers = [
13- '' ,
14- 'to Be' ,
15- 'to Equal (object)' ,
16- 'to Have Been Called' ,
17- 'to Have Been Called Times (number)' ,
18- 'to Have Been Called With (arg1,...)' ,
19- 'to Have Been Last Called With (arg1,...)' ,
20- 'to Have Been Nth Called With (nth call, arg1,...)' ,
21- 'to Have Length (number)' ,
22- 'to Have Property (keyPath, value[optional])' ,
23- 'to Be Close To (number, number of digits[optional])' ,
24- 'to Be Defined' ,
25- 'to Be Undefined' ,
26- 'to Be Falsy' ,
27- 'to Be Truthy' ,
28- 'to Be NaN' ,
29- 'to Be Greater Than (number)' ,
30- 'to Be Greater Than Or Equal (number)' ,
31- 'to Be Less Than (number)' ,
32- 'to Be Less Than Or Equal (number)' ,
33- 'to Be Instance Of (Class)' ,
34- 'to Contain (item in an array)' ,
35- 'to Contain Equal (an object in an array)' ,
36- 'to Match (regexp or string)' ,
37- 'to Match Object (object)' ,
38- 'to Srict Equal (object)' ,
39- 'to Throw (error[optional])' ,
40- ] ;
41-
42- //for mock fuctions only:
43- // 'to Have Returned',
44- // 'to Have Returned __ Times (number)',
45- // 'to Have Last Returned With',
46- // ];
4713
4814 const questionIcon = require ( '../../assets/images/help-circle.png' ) ;
4915 const closeIcon = require ( '../../assets/images/close.png' ) ;
@@ -80,8 +46,8 @@ const EndpointAssertion = ({ assertion, index, id }) => {
8046 < option value = 'Headers' > </ option >
8147 < option value = 'Status' > </ option >
8248 < option value = 'Body' > </ option >
83- < option value = 'Message ' > </ option >
84- < option value = 'Length ' > </ option >
49+ < option value = 'Text ' > </ option >
50+ < option value = 'Type ' > </ option >
8551 </ datalist >
8652 </ div >
8753 </ div >
@@ -92,7 +58,11 @@ const EndpointAssertion = ({ assertion, index, id }) => {
9258 </ div >
9359 < div id = { styles . notDiv } >
9460 Not?
95- < input type = 'checkbox' onChange = { ( e ) => handleChangeUpdateAssertion ( e , 'not' ) } />
61+ < input
62+ type = 'checkbox'
63+ onChange = { ( e ) => handleChangeUpdateAssertion ( e , 'not' ) }
64+ style = { { marginLeft : '5px' } }
65+ />
9666 </ div >
9767 </ div >
9868 < div id = { styles . dropdownFlex } >
@@ -107,16 +77,9 @@ const EndpointAssertion = ({ assertion, index, id }) => {
10777 </ select > { ' ' }
10878 < span id = { stylez . hastooltip } role = 'tooltip' >
10979 < img src = { questionIcon } alt = 'help' onClick = { handleClickTooltip } />
110- < span id = { stylez . tooltip } >
111- { /* <ToolTipMatcher toolTipType={statement.matcherType} /> */ }
112- Click me to find out more about Jest test matchers
113- </ span >
80+ < span id = { stylez . tooltip } > Click me to find out more about Jest test matchers</ span >
11481 </ span >
11582 </ div >
116- { /* <div id={stylez.autoTool}>
117- <input type='text' /> */ }
118-
119- { /* </div> */ }
12083 </ div >
12184 < div id = { styles . labelInput } >
12285 < label htmlFor = 'value' > Expected Value</ label >
0 commit comments