summaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2020-04-01 10:01:12 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-01 10:01:12 +0000
commit99f15c6328f77649ccfc7b1b790c98385754fd6a (patch)
treeec21110a190c391d5f28384f1512287687d92fed /ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js
parent1eafc9448d24f5b0eda40f62566bdf93cc4f5a6e (diff)
parent3173d554371bae1eefafc69b2bc9da5543510dd5 (diff)
Merge "Update template menu UI"
Diffstat (limited to 'ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js')
-rw-r--r--ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js b/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js
index 208c947c3..f362cfaa6 100644
--- a/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js
+++ b/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js
@@ -28,12 +28,12 @@ describe('Verify OpenLoopModal', () => {
beforeEach(() => {
fetch.resetMocks();
- fetch.mockResponseOnce(JSON.stringify([
+ fetch.mockResponse(JSON.stringify([
"LOOP_gmtAS_v1_0_ResourceInstanceName1_tca",
"LOOP_gmtAS_v1_0_ResourceInstanceName1_tca_3",
"LOOP_gmtAS_v1_0_ResourceInstanceName2_tca_2"
]));
- })
+ });
it('Test the render method', () => {
@@ -44,12 +44,12 @@ describe('Verify OpenLoopModal', () => {
it('Onchange event', () => {
const event = {value: 'LOOP_gmtAS_v1_0_ResourceInstanceName1_tca_3'};
const component = shallow(<OpenLoopModal/>);
-
component.find('StateManager').simulate('change', event);
component.update();
expect(component.state('chosenLoopName')).toEqual("LOOP_gmtAS_v1_0_ResourceInstanceName1_tca_3");
});
+
it('Test handleClose', () => {
const historyMock = { push: jest.fn() };
const handleClose = jest.spyOn(OpenLoopModal.prototype,'handleClose');