Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid var #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/tutorials/screenplay.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ A question does nothing by itself - just as we need an actor to perform an inter
One way we do this is to use the `asksFor()` method, like this:

```java
var todos = toby.asksFor(Text.ofEach(".todo-list label"));
Collection<String> todos = toby.asksFor(Text.ofEach(".todo-list label"));
```

If we add an AssertJ assertion to check that the list contains the value we expect, our completed test will look like the following:
Expand Down Expand Up @@ -201,7 +201,7 @@ class AddNewTodos {
Open.url("https://todomvc.com/examples/angularjs/#/"),
Enter.theValue("Buy some milk").into(".new-todo").thenHit(Keys.RETURN)
);
var todos = toby.asksFor(Text.ofEach(".todo-list li"));
Collection<String> todos = toby.asksFor(Text.ofEach(".todo-list li"));
assertThat(todos).containsExactly("Buy some milk");
}
}
Expand Down