// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/pages/todolist/newitem/NewTodoForm.java
// public class NewTodoForm {
//     public static Target NEW_TODO_FIELD = Target.the("New Todo Field").locatedBy("#new-todo");
// }


import net.serenitybdd.core.steps.Instrumented;
import net.serenitybdd.demos.todos.pages.todolist.newitem.NewTodoForm;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.Task;
import net.serenitybdd.screenplay.actions.Enter;
import net.serenitybdd.screenplay.actions.Hit;
import net.thucydides.core.annotations.Step;
import static org.openqa.selenium.Keys.RETURN;
package net.serenitybdd.demos.todos.tasks;



public class AddATodoItem implements Task {

    private final String thingToDo;

    protected AddATodoItem(String thingToDo) { this.thingToDo = thingToDo; }

    // tag::performAs[]
    @Step("{0} adds a todo item called #thingToDo")
    public <T extends Actor> void performAs(T actor) {
        actor.attemptsTo(
// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/pages/todolist/newitem/NewTodoForm.java
// public class NewTodoForm {
//     public static Target NEW_TODO_FIELD = Target.the("New Todo Field").locatedBy("#new-todo");
// }


// Path: src/samples/journey-pattern-sample/src/main/java/net/serenitybdd/demos/todos/tasks/AddATodoItem.java
import net.serenitybdd.core.steps.Instrumented;
import net.serenitybdd.demos.todos.pages.todolist.newitem.NewTodoForm;
import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.Task;
import net.serenitybdd.screenplay.actions.Enter;
import net.serenitybdd.screenplay.actions.Hit;
import net.thucydides.core.annotations.Step;
import static org.openqa.selenium.Keys.RETURN;

package net.serenitybdd.demos.todos.tasks;



public class AddATodoItem implements Task {

    private final String thingToDo;

    protected AddATodoItem(String thingToDo) { this.thingToDo = thingToDo; }

    // tag::performAs[]
    @Step("{0} adds a todo item called #thingToDo")
    public <T extends Actor> void performAs(T actor) {
        actor.attemptsTo(
                Enter.theValue(thingToDo).into(NewTodoForm.NEW_TODO_FIELD),