Add react ui test
Add react ui test to improve code coverage.
Issue-ID: CLAMP-509
Change-Id: Ic9c974a78ee453dddb8f985f3e9c9067f66e95d9
Signed-off-by: xuegao <xg353y@intl.att.com>
diff --git a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js
index 934fa49..e0aa8c6 100644
--- a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js
+++ b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js
@@ -29,13 +29,13 @@
describe('Verify DeployLoop', () => {
beforeEach(() => {
fetch.resetMocks();
- fetch.mockImplementation(() => {
- return Promise.resolve({
- ok: true,
- status: 200,
- text: () => "OK"
- });
- });
+ fetch.mockImplementation(() => {
+ return Promise.resolve({
+ ok: true,
+ status: 200,
+ text: () => "OK"
+ });
+ });
})
const loopCache = new LoopCache({
"name": "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca",
@@ -59,7 +59,7 @@
expect(handleClose).toHaveBeenCalledTimes(1);
expect(component.state('show')).toEqual(false);
- expect(historyMock.push.mock.calls[0]).toEqual([ '/', ]);
+ expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
});
it('Test handleSave', async () => {
@@ -74,6 +74,6 @@
expect(handleSave).toHaveBeenCalledTimes(1);
expect(component.state('show')).toEqual(false);
expect(component.state('componentName')).toEqual("TCA_h2NMX_v1_0_ResourceInstanceName1_tca");
- expect(historyMock.push.mock.calls[0]).toEqual([ '/', ]);
+ expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
});
});
\ No newline at end of file