import ConfigurationPolicyModal from './ConfigurationPolicyModal';
import LoopCache from '../../../api/LoopCache';
-
-describe('Verify DeployLoop', () => {
+describe('Verify ConfigurationPolicyModal', () => {
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",
}]
});
const historyMock = { push: jest.fn() };
- const matchMock = { params:{ componentName: "TCA_h2NMX_v1_0_ResourceInstanceName1_tca" } }
+ const matchMock = { params:{ policyName: "TCA_h2NMX_v1_0_ResourceInstanceName1_tca" } }
const flushPromises = () => new Promise(setImmediate);
it('Test handleClose', () => {
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 () => {
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(component.state('policyName')).toEqual("TCA_h2NMX_v1_0_ResourceInstanceName1_tca");
+ expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
});
});
\ No newline at end of file