e0e391b4dfc2a65b3be8ba74f4994136ac4a0d56
[vid.git] / vid-automation / src / main / java / vid / automation / test / sections / DeployMacroDialogOld.java
1 package vid.automation.test.sections;
2
3 import org.junit.Assert;
4 import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
5 import org.openqa.selenium.WebElement;
6 import vid.automation.test.Constants;
7
8 import static org.hamcrest.MatcherAssert.assertThat;
9 import static org.hamcrest.Matchers.containsString;
10
11 public class DeployMacroDialogOld extends DeployMacroDialogBase {
12     String dialogTitle = "macro";
13
14     @Override
15     public void assertTitle(){
16         WebElement modalTitle = GeneralUIUtils.getWebElementByTestID(Constants.CREATE_MODAL_TITLE_ID, 30);
17         assertThat(modalTitle.getText().toLowerCase(), containsString(dialogTitle));
18     }
19
20     @Override
21     public void closeDialog(){
22         GeneralUIUtils.ultimateWait();
23         clickCancelButtonByTestID();
24     }
25
26     @Override
27     public  void assertDialogExists(){
28         boolean byText = GeneralUIUtils.findAndWaitByText(Constants.BrowseASDC.CREATE_SERVICE_INSTANCE, 15);
29         Assert.assertTrue(byText);
30     }
31
32     @Override
33     public  void clickOwningEntitySelect(){
34         GeneralUIUtils.clickOnElementByTestId(Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID);
35     }
36
37     @Override
38     public  void clickProjectSelect(){
39         GeneralUIUtils.clickOnElementByTestId(Constants.OwningEntity.PROJECT_SELECT_TEST_ID);
40     }
41
42 }