- package demoproject.demoproject.steps;
- import net.thucydides.core.annotations.Step;
- import net.thucydides.core.pages.Pages;
- import net.thucydides.core.steps.ScenarioSteps;
- import static org.fest.assertions.Assertions.assertThat;
- import demoproject.demoproject.pages.DictionaryPage;
- public class EndUserSteps extends ScenarioSteps {
- DictionaryPage dictionaryPage;
- public EndUserSteps(Pages pages) {
- super(pages);
- }
- @Step
- public void enters(String keyword) {
- dictionaryPage.enter_keywords(keyword);
- }
- @Step
- public void starts_search() {
- dictionaryPage.lookup_terms();
- }
- @Step
- public void should_see_definition(String definition) {
- assertThat(dictionaryPage.getDefinitions()).contains(definition);
- }
- @Step
- public void is_the_home_page() {
- dictionaryPage.open();
- }
- @Step
- public void looks_for(String term) {
- enters(term);
- starts_search();
- }
- }