aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSara Weiss <sara.weiss@intl.att.com>2019-12-08 14:47:42 +0200
committerSara Weiss <sara.weiss@intl.att.com>2019-12-09 13:41:51 +0200
commitbae7a355deae5b9b16ac0343d4ec13018963e900 (patch)
treeefd0d77dc91a7a83478f38f5dbe54dc62b492e6d
parent640a01ed579abefa5781424ce16aa67f5e4f06a8 (diff)
Show previous instantiations button in new service modal e2e test
Issue-ID: VID-724 Signed-off-by: Sara Weiss <sara.weiss@intl.att.com> Change-Id: I0afa4fe8907c4e03630e15042188b794e4acfcc4
-rw-r--r--vid-automation/src/main/java/vid/automation/test/infra/Features.java1
-rw-r--r--vid-automation/src/main/java/vid/automation/test/sections/InstantiationStatusPage.java7
-rw-r--r--vid-automation/src/main/java/vid/automation/test/sections/deploy/DeployModernUIBase.java5
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java29
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts4
-rw-r--r--vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.html2
6 files changed, 41 insertions, 7 deletions
diff --git a/vid-automation/src/main/java/vid/automation/test/infra/Features.java b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
index cdf30e28d..289151b88 100644
--- a/vid-automation/src/main/java/vid/automation/test/infra/Features.java
+++ b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
@@ -54,6 +54,7 @@ public enum Features implements Feature {
FLAG_2002_VNF_PLATFORM_MULTI_SELECT,
FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS,
FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND,
+ FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER,
;
public boolean isActive() {
diff --git a/vid-automation/src/main/java/vid/automation/test/sections/InstantiationStatusPage.java b/vid-automation/src/main/java/vid/automation/test/sections/InstantiationStatusPage.java
index 1bb095fda..e8b002cb1 100644
--- a/vid-automation/src/main/java/vid/automation/test/sections/InstantiationStatusPage.java
+++ b/vid-automation/src/main/java/vid/automation/test/sections/InstantiationStatusPage.java
@@ -40,6 +40,13 @@ public abstract class InstantiationStatusPage extends VidBasePage {
return wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath("//*[table]//tbody/tr"))).size();
}
+ public static void verifyUrlMatchInstantiationStatusWithFilterSearchParam(String serviceModelId) {
+
+ Map<String, String> paramsMap = extractQueryParamsFromCurrentURL("instantiationStatus?");
+ assertEquals(paramsMap.get("filterText"), serviceModelId);
+
+ }
+
public static WebElement assertInstantiationStatusRow(String spanIdSelector, Map<String, String> fieldsIdsAndExpected) {
try {
WebElement newTrRow = getInstantiationStatusRow(spanIdSelector);
diff --git a/vid-automation/src/main/java/vid/automation/test/sections/deploy/DeployModernUIBase.java b/vid-automation/src/main/java/vid/automation/test/sections/deploy/DeployModernUIBase.java
index 6b2c1ecf4..747f4ebde 100644
--- a/vid-automation/src/main/java/vid/automation/test/sections/deploy/DeployModernUIBase.java
+++ b/vid-automation/src/main/java/vid/automation/test/sections/deploy/DeployModernUIBase.java
@@ -51,4 +51,9 @@ public abstract class DeployModernUIBase extends DeployDialogBase {
public void clickProjectSelect() {
GeneralUIUtils.clickOnElementByTestId(Constants.OwningEntity.PROJECT_SELECT_TEST_ID);
}
+
+ public void clickPreviousInstantiationButton() {
+ GeneralUIUtils.clickOnElementByTestIdWithoutWait("ShowPreviousInstancesButton");
+ }
+
}
diff --git a/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java b/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
index 1bbf0e3fb..03006ade7 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/BrowseASDCTest.java
@@ -6,6 +6,7 @@ import static org.testng.Assert.assertFalse;
import static vid.automation.test.infra.Features.FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI;
import static vid.automation.test.infra.Features.FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI;
import static vid.automation.test.infra.Features.FLAG_2002_IDENTIFY_INVARIANT_MACRO_UUID_BY_BACKEND;
+import static vid.automation.test.infra.Features.FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER;
import static vid.automation.test.infra.Features.FLAG_5G_IN_NEW_INSTANTIATION_UI;
import static vid.automation.test.infra.Features.FLAG_NETWORK_TO_ASYNC_INSTANTIATION;
import static vid.automation.test.infra.Features.FLAG_SHOW_ORCHESTRATION_TYPE;
@@ -45,6 +46,7 @@ import vid.automation.test.infra.SelectOption;
import vid.automation.test.model.Service;
import vid.automation.test.model.User;
import vid.automation.test.sections.BrowseASDCPage;
+import vid.automation.test.sections.InstantiationStatusPage;
import vid.automation.test.sections.SideMenu;
import vid.automation.test.sections.ViewEditPage;
import vid.automation.test.sections.deploy.DeployDialogBase;
@@ -314,14 +316,33 @@ public class BrowseASDCTest extends CreateInstanceDialogBaseTest {
@Test
private void testCategoryParamsDropdownsExistsInCreationDialog() throws Exception {
+ String serviceId = "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd";
+
+ DeployModernUIMacroDialog deployMacroDialog = getDeployModernUIMacroDialog(serviceId);
+ deployMacroDialog.assertDialog();
+ deployMacroDialog.clickProjectSelect();
+ deployMacroDialog.clickOwningEntitySelect();
+ }
+
+ private DeployModernUIMacroDialog getDeployModernUIMacroDialog(String serviceId) {
BrowseASDCPage browseASDCPage = registerSimulatorAndGoToBrowseSDC();
- Service service = servicesService.getService("2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd");
+ Service service = servicesService.getService(serviceId);
browseASDCPage.clickDeployServiceButtonByServiceUUID(service.uuid);
DeployModernUIMacroDialog deployMacroDialog = new DeployModernUIMacroDialog();
deployMacroDialog.waitForDialogToLoad();
- deployMacroDialog.assertDialog();
- deployMacroDialog.clickProjectSelect();
- deployMacroDialog.clickOwningEntitySelect();
+ return deployMacroDialog;
+ }
+
+ @Test
+ @FeatureTogglingTest(FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER)
+ private void testClickPreviousInstantiationsInCreationDialog() throws Exception {
+
+ String serviceId = "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd";
+ DeployModernUIMacroDialog deployMacroDialog = getDeployModernUIMacroDialog(serviceId);
+ deployMacroDialog.clickPreviousInstantiationButton();
+
+ InstantiationStatusPage.verifyUrlMatchInstantiationStatusWithFilterSearchParam(serviceId);
+
}
private BrowseASDCPage registerSimulatorAndGoToBrowseSDC() {
diff --git a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
index 9610d68fb..c510391cb 100644
--- a/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/instantiationStatus.e2e.ts
@@ -61,13 +61,13 @@ describe('Instantiation status', function () {
it('should filter rows by filter text', function () {
cy.openIframe('app/ui/#/instantiationStatus');
- cy.getElementByDataTestsId("instantiationStatusFilter").type("ComplexService");
+ cy.getElementByDataTestsId("instantiation-status-filter").type("ComplexService");
cy.get('table#instantiation-status tbody tr').should('have.length', 2);
});
it('should filter rows by url filter text', function () {
cy.openIframe('app/ui/#/instantiationStatus?filterText=ComplexService');
- cy.getElementByDataTestsId("instantiationStatusFilter").should('have.value','ComplexService');
+ cy.getElementByDataTestsId("instantiation-status-filter").should('have.value','ComplexService');
cy.get('table#instantiation-status tbody tr').should('have.length', 2);
});
diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.html b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.html
index 8e9e53602..16b8c0132 100644
--- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.html
+++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.html
@@ -18,7 +18,7 @@
</div>
<div class="instantiationStatusFilter" *ngIf=isInstantiationStatusFilterFlagOn()>
<input
- [attr.data-tests-id]="'instantiationStatusFilter'"
+ [attr.data-tests-id]="'instantiation-status-filter'"
class="form-control input-text"
[placeholder]="'filter'"
[(ngModel)]="filterText">