summaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/vid/automation/test/sections/DeployMacroDialog.java
blob: ae757333331983cb9073d1cd007f1efe5ea0b94a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package vid.automation.test.sections;

import org.openecomp.sdc.ci.tests.utilities.GeneralUIUtils;
import org.openqa.selenium.WebElement;
import vid.automation.test.Constants;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;

public class DeployMacroDialog extends DeployMacroDialogBase {
    String dialogTitle = Constants.BrowseASDC.CREATE_SERVICE_INSTANCE_MACRO_MODAL;
    @Override
    public void assertTitle(){

        WebElement modalTitle = GeneralUIUtils.getWebElementByTestID(Constants.CREATE_MODAL_TITLE_ID, 30);
        assertThat(modalTitle.getText().toLowerCase(), containsString(dialogTitle));
    }
    @Override
    public void closeDialog(){
        GeneralUIUtils.ultimateWait();
        clickCancelButtonByTestID();
        goOutFromIframe();
    }

    @Override
    public void assertDialogExists() {
        assertTitle();
    }

    @Override
    public void clickOwningEntitySelect() {
        GeneralUIUtils.clickOnElementByTestId(Constants.OwningEntity.OWNING_ENTITY_SELECT_TEST_ID);
    }

    @Override
    public void clickProjectSelect() {
        GeneralUIUtils.clickOnElementByTestId(Constants.OwningEntity.PROJECT_SELECT_TEST_ID);
    }
}