summaryrefslogtreecommitdiffstats
path: root/gui-clamp/ui-react/src/components/dialogs/Policy/ViewAllPolicies.test.js
diff options
context:
space:
mode:
authorLiam Fallon <liam.fallon@est.tech>2022-02-07 09:06:51 +0000
committerGerrit Code Review <gerrit@onap.org>2022-02-07 09:06:51 +0000
commit5ca5cc1e2607518d1fd2c05421a6e6b8c9cd12ea (patch)
tree57ae0711209a62d997fce35d5e74d0ffaeca500d /gui-clamp/ui-react/src/components/dialogs/Policy/ViewAllPolicies.test.js
parentf342bf5bd3684998f66cfd78213303e90abbd90f (diff)
parentc3ee2020d0bfd48c9b2a687d0f80e67190edb5d4 (diff)
Merge "Added Policy Jest Tests"
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');