Code Review
/
clamp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Draft of React test
[clamp.git]
/
ui-react
/
src
/
components
/
dialogs
/
OpenLoop
/
OpenLoopModal.test.js
diff --git
a/ui-react/src/__test__/OpenLoopModal.test.js
b/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js
similarity index 80%
rename from
ui-react/src/__test__/OpenLoopModal.test.js
rename to
ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js
index
044eeda
..
6ba8f40
100644
(file)
--- a/
ui-react/src/__test__/OpenLoopModal.test.js
+++ b/
ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js
@@
-22,11
+22,21
@@
*/
import React from 'react';
import { shallow } from 'enzyme';
*/
import React from 'react';
import { shallow } from 'enzyme';
-import OpenLoopModal from '.
./components/dialogs/OpenLoop
/OpenLoopModal';
+import OpenLoopModal from './OpenLoopModal';
describe('Verify OpenLoopModal', () => {
describe('Verify OpenLoopModal', () => {
+ beforeEach(() => {
+ fetch.resetMocks()
+ })
+
it('Test the render method', () => {
it('Test the render method', () => {
+ fetch.mockResponseOnce(JSON.stringify([
+ "LOOP_gmtAS_v1_0_ResourceInstanceName1_tca",
+ "LOOP_gmtAS_v1_0_ResourceInstanceName1_tca_3",
+ "LOOP_gmtAS_v1_0_ResourceInstanceName2_tca_2"
+ ]))
+
const component = shallow(<OpenLoopModal/>);
expect(component).toMatchSnapshot();
});
const component = shallow(<OpenLoopModal/>);
expect(component).toMatchSnapshot();
});