mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 15:55:49 +00:00
Fix tests
This commit is contained in:
parent
03cff1a308
commit
54792e17e3
2 changed files with 12 additions and 1 deletions
|
@ -13,11 +13,18 @@ import io.cucumber.java.en.When;
|
|||
|
||||
public class StepDefinition extends SpringIntegrationTest {
|
||||
|
||||
public static final String BASE_URL = "http://localhost:8080";
|
||||
|
||||
private final WebDriver webDriver = Browser.webDriver;
|
||||
|
||||
@Given("^I go to the main page$")
|
||||
public void mainPage() {
|
||||
webDriver.navigate().to("http://localhost:8080");
|
||||
webDriver.navigate().to(BASE_URL);
|
||||
}
|
||||
|
||||
@Given("^I go to the find-owners page$")
|
||||
public void findOwnersPage() {
|
||||
webDriver.navigate().to(BASE_URL + "/owners/find");
|
||||
}
|
||||
|
||||
@When("^I click on the link with title \"([^\"]*)\"$")
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
Feature: Find owners
|
||||
|
||||
Scenario: Find owners page
|
||||
Given I go to the main page
|
||||
When I click on the link with title "find owners"
|
||||
Then I should see the "Find Owners" page
|
||||
|
||||
Scenario: Should find an owner
|
||||
When I fill the field named "lastName" with value "Franklin"
|
||||
And I submit the form "search-owner-form"
|
||||
Then I should see the "Owner Information" page
|
||||
|
||||
Scenario: Should find multiple owners
|
||||
Given I go to the find-owners page
|
||||
When I fill the field named "lastName" with value "Davis"
|
||||
And I submit the form "search-owner-form"
|
||||
Then I should see the "Owners" page
|
||||
# Add additional checks here.
|
||||
|
|
Loading…
Reference in a new issue