net.serenitybdd.screenplay.questions.Text Java Examples

The following examples show how to use net.serenitybdd.screenplay.questions.Text. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CurrentFilter.java    From serenity-documentation with Apache License 2.0 6 votes vote down vote up
@Override
public TodoStatusFilter answeredBy(Actor actor) {
    return Text.of(FilterSelection.SELECTED_FILTER).viewedBy(actor).asEnum(TodoStatusFilter.class);
}
 
Example #2
Source File: DisplayedItems.java    From serenity-documentation with Apache License 2.0 6 votes vote down vote up
@Override
public List<String> answeredBy(Actor actor) {
    return Text.of(ToDoList.TODO_ITEMS).viewedBy(actor).asList();
}
 
Example #3
Source File: ApplicationDetails.java    From serenity-documentation with Apache License 2.0 6 votes vote down vote up
@Override
public ApplicationInformation answeredBy(Actor actor) {
    String title = BrowseTheWeb.as(actor).getTitle();
    String heading = Text.of(MAIN_HEADING).viewedBy(actor).value();
    String aboutInformation = Text.of(FOOTER).viewedBy(actor).value();

    return new ApplicationInformation(title, heading, aboutInformation);
}
 
Example #4
Source File: ProjectWidgetPipelineStages.java    From jenkins-build-monitor-plugin with MIT License 6 votes vote down vote up
@Override
public String answeredBy(Actor actor) {
    Target details = BuildMonitorDashboard.Project_Widget_Pipeline_Stages.of(projectName);

    return Text.of(details).viewedBy(actor).resolve();
}
 
Example #5
Source File: ProjectWidgetBuilds.java    From jenkins-build-monitor-plugin with MIT License 6 votes vote down vote up
@Override
public String answeredBy(Actor actor) {
    Target builds     = BuildMonitorDashboard.Project_Widget_Builds.of(projectName);

    return Text.of(builds).viewedBy(actor).resolve();
}
 
Example #6
Source File: ProjectWidgetDetails.java    From jenkins-build-monitor-plugin with MIT License 6 votes vote down vote up
@Override
public String answeredBy(Actor actor) {
    Target details    = BuildMonitorDashboard.Project_Widget_Details.of(projectName);

    return Text.of(details).viewedBy(actor).resolve();
}
 
Example #7
Source File: GoogleSearchResults.java    From tutorials with MIT License 6 votes vote down vote up
public List<String> answeredBy(Actor actor) {
    return Text.of(GoogleSearchPage.SEARCH_RESULT_TITLES).viewedBy(actor).asList();
}
 
Example #8
Source File: SearchResultsResponseTitle.java    From serenity-cucumber-bdd-screenplay with Apache License 2.0 5 votes vote down vote up
@Override
public String answeredBy(Actor actor) {
    return Text.of(SearchResultsPage.SEARCH_RESULTS_TITLE)
            .viewedBy(actor)
            .asString().toLowerCase();
}
 
Example #9
Source File: TheRemainingItemCount.java    From serenity-documentation with Apache License 2.0 5 votes vote down vote up
@Override
public Integer answeredBy(Actor actor) {
    return Text.of(TodoCounter.ITEM_COUNT)
               .viewedBy(actor)
               .asInteger();
}