aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
diff options
context:
space:
mode:
authorSonsino, Ofir (os0695) <os0695@intl.att.com>2018-07-10 15:57:37 +0300
committerSonsino, Ofir (os0695) <os0695@intl.att.com>2018-07-10 15:57:37 +0300
commitff76b5ed0aa91d5fdf9dc4f95e8b20f91ed9d072 (patch)
treeaae42404a93fdffdd16ff050eaa28129959f7577 /vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
parentc72d565bb58226b20625b2bce5f0019046bee649 (diff)
New Angular UI from 1806
Change-Id: I39c160db0e0a6ec2e587ccf007ee1b23c6a08666 Issue-ID: VID-208 Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts57
1 files changed, 57 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
new file mode 100644
index 00000000..9d1fbfdf
--- /dev/null
+++ b/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts
@@ -0,0 +1,57 @@
+///<reference path="../../../node_modules/cypress/types/index.d.ts"/>
+describe('Service popup', function () {
+ describe('basic UI tests', () => {
+
+ beforeEach(() => {
+ cy.window().then((win) => {
+ win.sessionStorage.clear();
+ cy.setReduxState();
+ cy.preventErrorsOnLoading();
+ cy.initAAIMock();
+ cy.initVidMock();
+ cy.login();
+ })
+ });
+
+ it('should contains basic selects with required astrix', function () {
+ cy.openIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true');
+ cy.isElementContainsAttr('service-form-set', 'disabled');
+ cy.get('label').contains('Subscriber name:').should('have.class', 'required')
+ .get('label').contains('Service type:').should('have.class', 'required')
+ .get('label').contains('LCP region:').should('have.class', 'required')
+ .get('label').contains('Tenant:').should('have.class', 'required')
+ .get('label').contains('Owning entity:').should('have.class', 'required')
+ .get('label').contains('Product family:').should('have.class', 'required')
+ .get('label').contains('AIC Zone:').should('not.have.class', 'required')
+ .get('label').contains('Project').should('not.have.class', 'required')
+ .get('label').contains('Rollback On Failure').should('have.class', 'required');
+ });
+
+ it('should be able fill all selects', function () {
+ cy.openIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true');
+
+ cy.selectDropdownOptionByText('subscriberName', 'USP VOICE');
+ cy.selectDropdownOptionByText('serviceType', 'VIRTUAL USP');
+ cy.selectDropdownOptionByText('productFamily', 'VIRTUAL USP');
+ cy.selectDropdownOptionByText('lcpRegion', 'mtn6');
+ cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-testgamma');
+ cy.selectDropdownOptionByText('aic_zone', 'NFTJSSSS-NFT1');
+ cy.selectDropdownOptionByText('project', 'DFW');
+ cy.selectDropdownOptionByText('owningEntity', 'aaa1');
+ cy.selectDropdownOptionByText('rollback', 'Rollback');
+
+ });
+
+ it('should display error when api return empty data', function () {
+ cy.readFile('/cypress/support/jsonBuilders/mocks/jsons/categoryParametres.json').then((res)=>{
+ res.categoryParameters.owningEntity = [];
+ cy.initCategoryParameter(<any>res);
+
+ cy.openIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true');
+
+ cy.get('.message').contains('No results for this request. Please change criteria.');
+ cy.get('form-general-error').contains('Page contains errors. Please see details next to the relevant fields.');
+ });
+ });
+ });
+});