aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration/iFrames
diff options
context:
space:
mode:
authorYoav Schneiderman <yoav.schneiderman@intl.att.com>2020-01-05 15:03:16 +0200
committerYoav Schneiderman <yoav.schneiderman@intl.att.com>2020-01-06 13:04:17 +0200
commit39a8639ddd4f9821c207cfa53264a475dcca8cf2 (patch)
tree5c671033f1d16caacb1014042fef5f731f96a584 /vid-webpack-master/cypress/integration/iFrames
parenta98e5f9165caf14f058d03cbc6749420adefe568 (diff)
Hide Templates entry point when no instances
Issue-ID: VID-741 Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com> Change-Id: I9f2c1879b30ed15b227cdd6189d14ef988bc3b1e Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Diffstat (limited to 'vid-webpack-master/cypress/integration/iFrames')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts9
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts12
2 files changed, 19 insertions, 2 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts
index 73d311555..0db1b099a 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiation.templates.modal.e2e.ts
@@ -71,7 +71,7 @@ describe('Template', () => {
cy.route(Cypress.config('baseUrl') + "/getuserID", 'us16807000');
- cy.openPopupIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true');
+ cy.openPopupIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true&hasTemplate=true');
});
@@ -117,10 +117,15 @@ describe('Template', () => {
cy.getElementByDataTestsId('filterByUserIdTestId').click();
cy.get('.member-table-row').should('have.length', 1);
+
+ // navigate to service modal -> should show Template button
+ cy.getElementByDataTestsId('startFromScratchButton').click().then(()=>{
+ cy.getElementByDataTestsId('templateButton').should('be.visible')
+ });
+
});
it('clicking on load template button, go to expected url', function () {
-
cy.getElementByDataTestsId('templateButton').contains('Template')
.getElementByDataTestsId('templateButton').click({force: true}) // Open template Modal
diff --git a/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
index 83e6b4dbc..4b27ad008 100644
--- a/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
@@ -30,6 +30,17 @@ describe('Service popup', function () {
});
});
+ it('a-la-carte service instantiation popup should show Template button ', function () {
+ cy.readFile('cypress/support/jsonBuilders/mocks/jsons/emptyServiceRedux.json').then((res1) => {
+ res1.service.serviceHierarchy["2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd"].service.vidNotions.instantiationType = 'ALaCarte';
+ res1.global.flags = {};
+ res1.global.flags["FLAG_2004_INSTANTIATION_TEMPLATES_POPUP"] = true;
+ cy.setReduxState(<any>res1);
+ cy.openPopupIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true&hasTemplate=true');
+ cy.getElementByDataTestsId('templateButton').should('be.visible')
+ });
+ });
+
it('a-la-carte service instantiation popup has Instance name as required', function () {
cy.readFile('cypress/support/jsonBuilders/mocks/jsons/emptyServiceRedux.json').then((res1) => {
res1.service.serviceHierarchy["2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd"].service.vidNotions.instantiationType = 'ALaCarte';
@@ -39,6 +50,7 @@ describe('Service popup', function () {
cy.openPopupIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true');
cy.isElementContainsAttr('form-set', 'disabled');
cy.get('label').contains('Instance name:').should('have.class', 'required');
+ cy.getElementByDataTestsId('templateButton').should('not.be.visible')
});
});