-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
102 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/test/java/net/serenitybdd/demos/todos/cucumber/steps/TodoUserActionSteps.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package net.serenitybdd.demos.todos.cucumber.steps; | ||
|
||
import io.cucumber.java.en.And; | ||
import io.cucumber.java.en.Given; | ||
import io.cucumber.java.en.Then; | ||
import io.cucumber.java.en.When; | ||
import net.serenitybdd.annotations.Steps; | ||
import net.serenitybdd.demos.todos.pageobjects.model.TodoStatusFilter; | ||
import net.serenitybdd.demos.todos.pageobjects.steps.TodoUserSteps; | ||
import net.serenitybdd.screenplay.Actor; | ||
|
||
import java.util.List; | ||
|
||
public class TodoUserActionSteps { | ||
|
||
@Steps | ||
TodoUserSteps james; | ||
|
||
@Given("Jane has prepared a todo list containing {items}") | ||
public void that_James_has_an_empty_todo_list(List<String> items) { | ||
james.starts_with_a_todo_list_containing(items.toArray(new String[]{})); | ||
} | ||
|
||
@And("he/she has completed the task called {string}") | ||
public void sheHasCompletedTheTaskCalled(String task) { | ||
james.completes(task); | ||
} | ||
|
||
@When("she filters the list to show only {} tasks") | ||
public void sheFiltersTheListToShowOnlyFilterTasks(String status) { | ||
james.filters_items_to_show(TodoStatusFilter.valueOf(status)); | ||
} | ||
|
||
@Then("her list should contain {items}") | ||
public void herListShouldContain(List<String> items) { | ||
james.should_see_that_displayed_items_contain(items.toArray(new String[]{})); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
src/test/java/net/serenitybdd/demos/todos/pageobjects/completing_todos/ExampleSteps.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/test/resources/features/cucumber/maintain_my_todo_list/filtering_other_todos.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@cucumber | ||
@filtering | ||
Feature: Filtering other todos | ||
|
||
In order to make me feel a sense of accomplishment | ||
As a forgetful person | ||
I want to be to view all of things I have completed | ||
|
||
Scenario Outline: Filtering items by status | ||
Given Jane has prepared a todo list containing <tasks> | ||
And she has completed the task called "<completed>" | ||
When she filters the list to show only <filter> tasks | ||
Then her list should contain <expected> | ||
Examples: | ||
| tasks | completed | filter | expected | | ||
| Buy some milk, Walk the dog | Walk the dog | Active | Buy some milk | | ||
# | Buy some milk, Walk the dog | Broken | Active | Buy some milk | | ||
| Buy some milk, Walk the dog | Walk the dog | Completed | Walk the dog | | ||
| Buy some milk, Walk the dog | Walk the dog | All | Buy some milk, Walk the dog | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters