use of io.syndesis.qe.fragments.common.menu.KebabMenu in project syndesis-qe by syndesisio.
the class ConnectionSteps method checkAllVisibleKebabMenus.
@Then("^check visibility of unveiled kebab menu of all connections, each of this menu consist of \"(\\w+)\", \"(\\w+)\" and \"(\\w+)\" actions$")
public void checkAllVisibleKebabMenus(String action1, String action2, String action3) {
List<String> actions = new ArrayList<>(Arrays.asList(action1, action2, action3));
for (SelenideElement connection : connectionsPage.getAllConnections()) {
KebabMenu kebabMenu = new KebabMenu(connection.$(ByUtils.dataTestId("button", "connection-card-kebab")).shouldBe(visible));
try {
kebabMenu.open();
TestUtils.sleepIgnoreInterrupt(1000);
for (String item : actions) {
if (!kebabMenu.isItemElementVisible(item)) {
kebabMenu.open();
assertTrue(kebabMenu.isItemElementVisible(item));
}
}
} catch (org.openqa.selenium.StaleElementReferenceException e) {
kebabMenu = new KebabMenu(connection.$(By.xpath(".//button")).shouldBe(visible));
kebabMenu.open();
for (String item : actions) {
kebabMenu.getItemElement(item).shouldBe(visible);
}
}
}
}
use of io.syndesis.qe.fragments.common.menu.KebabMenu in project syndesis-qe by syndesisio.
the class ConnectionSteps method clickOnKebabMenuButtonOfConnection.
@When("^click on the \"([^\"]*)\" kebab menu button of \"([^\"]*)\"$")
public void clickOnKebabMenuButtonOfConnection(String button, String connectionName) throws Throwable {
KebabMenu kebabMenu = new KebabMenu(connectionsPage.getConnection(connectionName).$(By.xpath(".//button")).shouldBe(visible));
kebabMenu.open();
kebabMenu.getItemElement(button).shouldBe(visible).click();
}
use of io.syndesis.qe.fragments.common.menu.KebabMenu in project syndesis-qe by syndesisio.
the class IntegrationsList method invokeActionOnItem.
public void invokeActionOnItem(String title, ListAction action) {
KebabMenu kebabMenu = new KebabMenu(getItem(title).$(By.xpath(".//button")).should(exist));
switch(action) {
case VIEW:
viewIntegration(title);
break;
case DELETE:
kebabMenu.open();
kebabMenu.getItemElement("Delete").shouldBe(visible).click();
new ModalDialogPage().getButton("Delete").shouldBe(visible).click();
break;
default:
}
}
use of io.syndesis.qe.fragments.common.menu.KebabMenu in project syndesis-qe by syndesisio.
the class ConnectionsList method invokeActionOnItem.
@Override
public void invokeActionOnItem(String title, ListAction action) {
switch(action) {
case DELETE:
KebabMenu kebabMenu = new KebabMenu($(kebabMenu(title)).shouldBe(visible));
kebabMenu.open();
kebabMenu.getItemElement("Delete").shouldBe(visible).click();
TestUtils.sleepForJenkinsDelayIfHigher(3);
new ModalDialogPage().getButton("Delete").shouldBe(visible).click();
break;
case CLICK:
getItem(title).find(Element.CONNECTION_CARD_TITLE).shouldBe(visible).click();
break;
default:
super.invokeActionOnItem(title, action);
}
}
Aggregations