diff options
Diffstat (limited to 'vid-automation')
4 files changed, 38 insertions, 4 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() { |