summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test/softwareProduct/landingPage/landingPage.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui/test/softwareProduct/landingPage/landingPage.test.js')
-rw-r--r--openecomp-ui/test/softwareProduct/landingPage/landingPage.test.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/openecomp-ui/test/softwareProduct/landingPage/landingPage.test.js b/openecomp-ui/test/softwareProduct/landingPage/landingPage.test.js
index 0b99933a7f..3928a3de95 100644
--- a/openecomp-ui/test/softwareProduct/landingPage/landingPage.test.js
+++ b/openecomp-ui/test/softwareProduct/landingPage/landingPage.test.js
@@ -107,6 +107,34 @@ describe('Software Product Landing Page: ', function () {
expect(vspLandingView).toBeTruthy();
});
+ it('vsp licence agreement type change', () => {
+ const params = {
+ ...currentScreen.props,
+ currentSoftwareProduct,
+ componentsList: VSPComponentsFactory.buildList(2)
+ };
+ const e = { target: {
+ value: 'INTERNAL'
+ }};
+ const obj = {dummyFunction: x => true};
+ const store = storeCreator();
+ let vspLandingView = TestUtils.renderIntoDocument(
+ <Provider store={store}>
+ <SoftwareProductLandingPageView {...params}/>
+ </Provider>
+ );
+ let vspLandingViewWrapper = TestUtils.findRenderedComponentWithType(
+ vspLandingView,
+ SoftwareProductLandingPageView
+ );
+ const spy = jest.spyOn(obj, "dummyFunction");
+ vspLandingViewWrapper.licenceChange(e, currentSoftwareProduct, obj.dummyFunction);
+ expect(spy).toHaveBeenCalled();
+ expect(currentSoftwareProduct.licenseType).toBe("INTERNAL");
+ expect(vspLandingViewWrapper).toBeTruthy();
+
+ })
+
it('vsp landing handleOnDragEnter test ', () => {
const params = {