// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/pages/todolist/ToDoList.java
// public class ToDoList extends PageObject {
//     public static Target TODO_ITEMS = Target.the("Todo items").locatedBy(".view label");
// }


import net.serenitybdd.demos.todos.pages.todolist.ToDoList;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.Question;
import net.serenitybdd.screenplay.annotations.Subject;
import net.serenitybdd.screenplay.questions.Text;
import java.util.List;
package net.serenitybdd.demos.todos.questions;



@Subject("the displayed todo items")
public class DisplayedItems implements Question<List<String>> {

    @Override
    public List<String> answeredBy(Actor actor) {
// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/pages/todolist/ToDoList.java
// public class ToDoList extends PageObject {
//     public static Target TODO_ITEMS = Target.the("Todo items").locatedBy(".view label");
// }


// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/questions/DisplayedItems.java
import net.serenitybdd.demos.todos.pages.todolist.ToDoList;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.Question;
import net.serenitybdd.screenplay.annotations.Subject;
import net.serenitybdd.screenplay.questions.Text;
import java.util.List;

package net.serenitybdd.demos.todos.questions;



@Subject("the displayed todo items")
public class DisplayedItems implements Question<List<String>> {

    @Override
    public List<String> answeredBy(Actor actor) {
        return Text.of(ToDoList.TODO_ITEMS).viewedBy(actor).asList();