summaryrefslogtreecommitdiffstats
path: root/gui-clamp/ui-react/src/components/dialogs/Policy/ViewAllPolicies.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'gui-clamp/ui-react/src/components/dialogs/Policy/ViewAllPolicies.test.js')
-rw-r--r--gui-clamp/ui-react/src/components/dialogs/Policy/ViewAllPolicies.test.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/gui-clamp/ui-react/src/components/dialogs/Policy/ViewAllPolicies.test.js b/gui-clamp/ui-react/src/components/dialogs/Policy/ViewAllPolicies.test.js
index d477c9a..d4a3fd9 100644
--- a/gui-clamp/ui-react/src/components/dialogs/Policy/ViewAllPolicies.test.js
+++ b/gui-clamp/ui-react/src/components/dialogs/Policy/ViewAllPolicies.test.js
@@ -24,6 +24,7 @@ import fs from "fs";
import PolicyToscaService from "../../../api/PolicyToscaService";
import PolicyService from "../../../api/PolicyService";
import CreateLoopModal from "../Loop/CreateLoopModal";
+import toJson from "enzyme-to-json";
describe('Verify ViewAllPolicies', () => {
let toscaPolicyModels = fs.readFileSync('src/components/dialogs/Policy/toscaData.test.json', {
@@ -35,6 +36,11 @@ describe('Verify ViewAllPolicies', () => {
flag: 'r'
});
+ it("renders correctly", () => {
+ const component = shallow(<ViewAllPolicies />);
+ expect(toJson(component)).toMatchSnapshot();
+ });
+
it('Test handleClose', () => {
const historyMock = {push: jest.fn()};
const handleClose = jest.spyOn(ViewAllPolicies.prototype, 'handleClose');