Search in sources :

Example 6 with Form

use of io.syndesis.qe.fragments.common.form.Form in project syndesis-qe by syndesisio.

the class JiraSteps method fillIssueKey.

@When("fill in issuekey for previously created issue")
public void fillIssueKey() {
    Form.waitForInputs(20);
    new Form(new SyndesisRootPage().getRootElement()).fillByTestId(TestUtils.map("issuekey", sharedIssueKey));
}
Also used : SyndesisRootPage(io.syndesis.qe.pages.SyndesisRootPage) Form(io.syndesis.qe.fragments.common.form.Form) When(io.cucumber.java.en.When)

Example 7 with Form

use of io.syndesis.qe.fragments.common.form.Form in project syndesis-qe by syndesisio.

the class SettingsPage method fillOAuthItem.

public void fillOAuthItem(SelenideElement item, String credentialsName) {
    Form form = new Form(item);
    Account account = AccountsDirectory.getInstance().get(credentialsName);
    Map<String, String> properties = new HashMap<>();
    account.getProperties().forEach((key, value) -> properties.put(key.toLowerCase(), value));
    form.fillByTestId(properties);
}
Also used : Account(io.syndesis.qe.account.Account) Form(io.syndesis.qe.fragments.common.form.Form) HashMap(java.util.HashMap)

Example 8 with Form

use of io.syndesis.qe.fragments.common.form.Form in project syndesis-qe by syndesisio.

the class CommonSteps method fillFormViaID.

@Then("^fill in values by element ID")
public void fillFormViaID(DataTable data) {
    Form.waitForInputs(20);
    TestUtils.sleepIgnoreInterrupt(2000);
    new Form(new SyndesisRootPage().getRootElement()).fillById(data.asMap(String.class, String.class));
}
Also used : SyndesisRootPage(io.syndesis.qe.pages.SyndesisRootPage) Form(io.syndesis.qe.fragments.common.form.Form) Then(io.cucumber.java.en.Then)

Example 9 with Form

use of io.syndesis.qe.fragments.common.form.Form in project syndesis-qe by syndesisio.

the class CommonSteps method fillFormByTestIdFromCreds.

@Then("^fill in data-testid field \"([^\"]*)\" from property \"([^\"]*)\" of credentials \"([^\"]*)\"")
public void fillFormByTestIdFromCreds(String testId, String property, String credentials) {
    Account account = AccountsDirectory.getInstance().get(credentials);
    Map<String, String> map = new HashMap<>();
    map.put(testId, account.getProperty(property));
    new Form(new SyndesisRootPage().getRootElement()).fillByTestId(map);
}
Also used : GoogleAccount(io.syndesis.qe.utils.google.GoogleAccount) Account(io.syndesis.qe.account.Account) SyndesisRootPage(io.syndesis.qe.pages.SyndesisRootPage) HashMap(java.util.HashMap) Form(io.syndesis.qe.fragments.common.form.Form) Then(io.cucumber.java.en.Then)

Example 10 with Form

use of io.syndesis.qe.fragments.common.form.Form in project syndesis-qe by syndesisio.

the class TodoSteps method fillHostUrl.

@When("^fill in TODO API host URL$")
public void fillHostUrl() {
    if (OpenShiftUtils.getInstance().getRoute("todo2") == null || !OpenShiftUtils.getInstance().getRoute("todo2").getSpec().getHost().equals("/")) {
        TodoUtils.createDefaultRouteForTodo("todo2", "/");
    }
    String host = "http://" + OpenShiftUtils.getInstance().getRoute("todo2").getSpec().getHost();
    Map<String, String> todoConfigMap = new HashMap<>();
    todoConfigMap.put("host", host);
    new Form($(By.id("root"))).fillByTestId(todoConfigMap);
}
Also used : HashMap(java.util.HashMap) Form(io.syndesis.qe.fragments.common.form.Form) When(io.cucumber.java.en.When)

Aggregations

Form (io.syndesis.qe.fragments.common.form.Form)14 SyndesisRootPage (io.syndesis.qe.pages.SyndesisRootPage)8 When (io.cucumber.java.en.When)6 HashMap (java.util.HashMap)6 Then (io.cucumber.java.en.Then)5 SelenideElement (com.codeborne.selenide.SelenideElement)2 Account (io.syndesis.qe.account.Account)2 GoogleAccount (io.syndesis.qe.utils.google.GoogleAccount)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1