summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration/iFrames
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-12-08 10:12:01 +0200
committerEylon Malin <eylon.malin@intl.att.com>2019-12-08 09:09:16 +0000
commit93f8bd75f3096b9f59e721c0f298445dfa88fd95 (patch)
treef58b3d7f5ab16bd6552f4cf2cee978235b3472d9 /vid-webpack-master/cypress/integration/iFrames
parentbfc61c4bb476d05ed0e06ecc9e68121e364cfceb (diff)
fix cypress test: should enable correct menu items
Issue-ID: VID-724 The cypress test not handling well scroll bar so decrease data Change-Id: I7541b7127866bb0cc8651d80ab2721846eafabde Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-webpack-master/cypress/integration/iFrames')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts66
1 files changed, 39 insertions, 27 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
index 054f7858b..9a0c1aa36 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
@@ -70,34 +70,46 @@ describe('Instantiation status', function () {
cy.get('table#instantiation-status tbody tr').should('have.length', 3);
});
+ function getDropDownMenuByDataTestId(testId:String) {
+ return cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='${testId}']`);
+ }
+
+ function clickOnTitleAndThenOnMenuWithJobId(jobId: string) {
+ cy.getElementByDataTestsId("instantiation-status-title").click();
+ cy.get('#' + jobId).find('.menu-div').click();
+ }
+
it('should enable correct menu items', function () {
- cy.openIframe('app/ui/#/instantiationStatus');
-
- // Instantiate action with Job status FAILED - isRetry = true
- cy.get( '#5c2cd8e5-27d0-42e3-85a1-85db5eaba459').find('.menu-div').click();
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-retry']`).should('not.exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-remove']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-open']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-hide']`).should('not.exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-audit-info']`).should('not.exist');
-
- // Instantiate action with Job status FAILED - isRetry = false
- cy.get( '#e1db03c3-6274-4ff7-84cf-7bd3a3946de7').find('.menu-div').click();
- cy.get('.dropdown-menu').find(`[data-tests-id='context-menu-retry']`).should('not.be.visible');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-open']`).should('exist');
-
- //Delete action with Job status IN_PROGRESS
- cy.get( '#850dc7d2-5240-437f-9bcd-b1ed7dc339c2').find('.menu-div').click();
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-remove']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-open']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-hide']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-audit-info']`).should('not.exist');
- //Update action with Job status COMPLETED
- cy.get( '#850dc7d2-5240-437f-9bcd-b1ed7dc339c1').find('.menu-div').click();
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-remove']`).should('exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-open']`).should('not.exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-hide']`).should('not.exist');
- cy.get('.dropdown-menu').find('.disabled').find(`[data-tests-id='context-menu-audit-info']`).should('not.exist');
+
+ cy.openIframe('app/ui/#/instantiationStatus');
+
+ // Instantiate action with Job status FAILED - isRetry = true
+
+ clickOnTitleAndThenOnMenuWithJobId('5c2cd8e5-27d0-42e3-85a1-85db5eaba459');
+ getDropDownMenuByDataTestId('context-menu-retry').should('not.exist');
+ getDropDownMenuByDataTestId('context-menu-remove').should('exist');
+ getDropDownMenuByDataTestId('context-menu-open').should('exist');
+ getDropDownMenuByDataTestId('context-menu-hide').should('not.exist');
+ getDropDownMenuByDataTestId('context-menu-audit-info').should('not.exist');
+
+ // Instantiate action with Job status FAILED - isRetry = false
+ clickOnTitleAndThenOnMenuWithJobId('e1db03c3-6274-4ff7-84cf-7bd3a3946de7');
+ getDropDownMenuByDataTestId('context-menu-retry').should('not.be.visible');
+ getDropDownMenuByDataTestId('context-menu-open').should('exist');
+
+ //Delete action with Job status IN_PROGRESS
+ clickOnTitleAndThenOnMenuWithJobId('850dc7d2-5240-437f-9bcd-b1ed7dc339c2');
+ getDropDownMenuByDataTestId('context-menu-remove').should('exist');
+ getDropDownMenuByDataTestId('context-menu-open').should('exist');
+ getDropDownMenuByDataTestId('context-menu-hide').should('exist');
+ getDropDownMenuByDataTestId('context-menu-audit-info').should('not.exist');
+
+ //Update action with Job status COMPLETED
+ clickOnTitleAndThenOnMenuWithJobId('850dc7d2-5240-437f-9bcd-b1ed7dc339c1');
+ getDropDownMenuByDataTestId('context-menu-remove').should('exist');
+ getDropDownMenuByDataTestId('context-menu-open').should('not.exist');
+ getDropDownMenuByDataTestId('context-menu-hide').should('not.exist');
+ getDropDownMenuByDataTestId('context-menu-audit-info').should('not.exist');
});
});