adjust BrowseASDCTest with FLAG_2002_ANY_ALACARTE_BESIDES_EXCLUDED_NEW_INSTANTIATION_UI
[vid.git] / vid-automation / src / main / java / vid / automation / test / sections / deploy / DeployModernUIBase.java
1 package vid.automation.test.sections.deploy;
2
3 import static org.hamcrest.MatcherAssert.assertThat;
4 import static org.hamcrest.Matchers.containsString;
5
6 import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
7 import org.openqa.selenium.WebElement;
8 import vid.automation.test.Constants;
9 import vid.automation.test.infra.Exists;
10
11 public abstract class DeployModernUIBase extends DeployDialogBase {
12
13     @Override
14     public void waitForDialogToLoad() {
15         goToIframe();
16     }
17
18     String dialogTitle = "Set a new service instance";
19
20     public void assertTitle(){
21         WebElement modalTitle = GeneralUIUtils.getWebElementByTestID(Constants.CREATE_MODAL_TITLE_ID, 30);
22         assertThat(modalTitle.getText(), containsString(dialogTitle));
23     }
24
25     @Override
26     public void closeDialog(){
27         GeneralUIUtils.ultimateWait();
28         clickCancelButtonByTestID();
29         goOutFromIframe();
30     }
31
32     @Override
33     public void assertDialog() {
34         assertTitle();
35     }
36
37     protected boolean isLcpRegionExist() {
38         return Exists.byTestId(Constants.ViewEdit.LCP_REGION_SELECT_TESTS_ID);
39     }
40
41     public void clickOwningEntitySelect() {
42         GeneralUIUtils.clickOnElementByTestId(Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID);
43     }
44
45     public void clickProjectSelect() {
46         GeneralUIUtils.clickOnElementByTestId(Constants.OwningEntity.PROJECT_SELECT_TEST_ID);
47     }
48 }