summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test/softwareProduct/landingPage/landingPage.test.js
diff options
context:
space:
mode:
authorJerzySzachniewicz <jerzy.szachniewicz@nokia.com>2021-02-12 13:53:13 +0100
committerChristophe Closset <christophe.closset@intl.att.com>2021-02-17 15:43:47 +0000
commitf2c0a4118c3c0b6360b639622766543bd754b59c (patch)
tree19e8aa82bc11dd1be0d487dde833cbaa33d69cfd /openecomp-ui/test/softwareProduct/landingPage/landingPage.test.js
parent7f418398a37283d68c0fc934e0e4a91f529fe466 (diff)
Creation of Vendor Licensing Model is an optional step in VSP onboarding
Issue-ID: SDC-3471 Signed-off-by: JerzySzachniewicz <jerzy.szachniewicz@nokia.com> Change-Id: Icb98d0832c49939e200ece77f4ca26744cb82222
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 = {