summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java4
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts10
-rw-r--r--vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json3
3 files changed, 12 insertions, 5 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java
index 07c2d1593..91801973b 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java
@@ -435,8 +435,8 @@ public class AsyncInstantiationBusinessLogicImpl implements
}
private boolean isRetryEnabledForStatus(JobStatus jobStatus) {
- return featureManager.isActive(Features.FLAG_1902_RETRY_JOB) &&
- (jobStatus==JobStatus.COMPLETED_WITH_ERRORS || jobStatus==JobStatus.FAILED);
+ return jobStatus==JobStatus.COMPLETED_AND_PAUSED || (featureManager.isActive(Features.FLAG_1902_RETRY_JOB) &&
+ (jobStatus==JobStatus.COMPLETED_WITH_ERRORS || jobStatus==JobStatus.FAILED));
}
private void setServiceInfoStatus(ServiceInfo serviceInfo, JobStatus jobStatus) {
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
index 8d19bc90d..a95d8e7cf 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
@@ -118,12 +118,11 @@ describe('Instantiation status', function () {
cy.get('#' + jobId).find('.menu-div').click();
}
- it('should disabled correct menu items', function () {
+ it.only('should disabled correct menu items', function () {
cy.openIframe('app/ui/#/instantiationStatus');
// Instantiate action with Job status FAILED - isRetry = true
-
clickOnTitleAndThenOnMenuWithJobId('5c2cd8e5-27d0-42e3-85a1-85db5eaba459');
getDisabledDropDownItemByDataTestId('context-menu-retry').should('not.exist');
getDisabledDropDownItemByDataTestId('context-menu-remove').should('exist');
@@ -153,6 +152,13 @@ describe('Instantiation status', function () {
getDisabledDropDownItemByDataTestId('context-menu-hide').should('not.exist');
getDisabledDropDownItemByDataTestId('context-menu-audit-info').should('not.exist');
getDisabledDropDownItemByDataTestId(contextMenuCreateAnotherOne).should('exist');
+
+ //COMPLETED_AND_PAUSED
+ clickOnTitleAndThenOnMenuWithJobId('850dc7d2-5240-437f-9bcd-b1ed7dc339d9');
+ getDisabledDropDownItemByDataTestId('context-menu-retry').should('exist');
+ getDisabledDropDownItemByDataTestId('context-menu-open').should('exist');
+ getDisabledDropDownItemByDataTestId('context-menu-audit-info').should('exist');
+ getDisabledDropDownItemByDataTestId(contextMenuCreateAnotherOne).should('exist');
});
it('clicking on create another one item, go to expected url', function () {
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json
index f2bb9d1c7..28fd5216f 100644
--- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json
+++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/asyncInstantiation.json
@@ -339,6 +339,7 @@
"serviceModelId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
"serviceModelName": "action-data",
"serviceModelVersion": "1.0",
- "createdBulkDate": 1524663233000
+ "createdBulkDate": 1524663233000,
+ "isRetryEnabled": true
}
]