summaryrefslogtreecommitdiffstats
path: root/public/cypress/integration/mocks/generalPage-spec.ts
diff options
context:
space:
mode:
authorStone, Avi (as206k) <as206k@att.com>2018-04-12 16:36:39 +0300
committerStone, Avi (as206k) <as206k@att.com>2018-04-12 16:36:39 +0300
commit9b2ceb347a3371819fcad6bbe2268203afecaf4e (patch)
treefbb5ea2c147d71dfeeec0882b215423e7b7206b4 /public/cypress/integration/mocks/generalPage-spec.ts
parent72dc8e3298d3e4315cdd9717b778671cb0b625bc (diff)
DCAE-D fe initial commit
DCAE-D fe initial commit Change-Id: Ica8ccb7c7ef769c969664d1e168d205eb9fc67f2 Issue-ID: SDC-1218 Signed-off-by: Stone, Avi (as206k) <as206k@att.com>
Diffstat (limited to 'public/cypress/integration/mocks/generalPage-spec.ts')
-rw-r--r--public/cypress/integration/mocks/generalPage-spec.ts84
1 files changed, 84 insertions, 0 deletions
diff --git a/public/cypress/integration/mocks/generalPage-spec.ts b/public/cypress/integration/mocks/generalPage-spec.ts
new file mode 100644
index 0000000..1297de8
--- /dev/null
+++ b/public/cypress/integration/mocks/generalPage-spec.ts
@@ -0,0 +1,84 @@
+describe('General Page - E2E test flow with mock', () => {
+ describe('Create new MC', () => {
+ beforeEach(() => {
+ cy.httpGetDDLData();
+ cy.getMCListEmpty();
+ cy.homePage();
+ cy.get('button[data-tests-id="btn-create-mc"]').click();
+ });
+
+ it('Create button need to be disabled', () => {
+ cy
+ .get('button[data-tests-id="createMonitoring"]')
+ .should('be.visible')
+ .and('be.disabled');
+ });
+
+ it('Fill form then click to submit verify setting button and constrain ddl', () => {
+ cy.fillNewMcForm();
+ cy
+ .get('button[data-tests-id="createMonitoring"]')
+ .as('createButton')
+ .not('[disabled]')
+ .should('not.contain', 'Disabled');
+
+ cy.httpCreateNewMc();
+ cy.emptyRuleEngine('Type1');
+
+ cy.get('@createButton').click();
+ cy
+ .get('#ui-tabpanel-1-label')
+ .should('contain', 'map')
+ .click();
+ cy
+ .get('button[data-tests-id="setting-gear"]')
+ .should('be.visible')
+ .first()
+ .click({ multiple: true });
+
+ cy
+ .get('.map-setting-list #mappingType > .field-text')
+ .should('have.value', 'multiple');
+ });
+ });
+
+ describe('Tabs after MC created', () => {
+ beforeEach(() => {
+ cy.httpGetDDLData();
+ cy.getMCListEmpty();
+ cy.homePage();
+ cy.get('button[data-tests-id="btn-create-mc"]').click();
+ cy.fillNewMcForm();
+ cy.httpCreateNewMc();
+ cy.emptyRuleEngine('Type1');
+ cy.get('button[data-tests-id="createMonitoring"]').click();
+ });
+
+ it('should have 4 icon buttons in map tab', () => {
+ cy
+ .get('#ui-tabpanel-1-label')
+ .should('contain', 'map')
+ .click();
+ cy
+ .get('.map-bar-icon-container>button')
+ .should('have.length', 2)
+ .get('.map-bar-icon-container>div>button')
+ .should('have.length', 2)
+ .and('be.visible');
+ });
+
+ it('should have 2 icon buttons in supplement tab', () => {
+ cy
+ .get('#ui-tabpanel-2-label')
+ .should('contain', 'supplement')
+ .click();
+ cy
+ .get('.supplement-bar-icon-container>button')
+ .should('have.length', 2)
+ .and('be.visible')
+ .get('.supplement-bar-icon-container')
+ .children()
+ .should('have.length', 3);
+ });
+ });
+});