示例#1
0
 @Step
 @When("the user submits form with '$name', '$email', '$password', '$confirmPassword'")
 public void submitForm(String name, String email, String password, String confirmPassword) {
   registrationPage.fill("name", name);
   registrationPage.fill("email", email);
   registrationPage.fill("password", password);
   registrationPage.fill("confirmPassword", confirmPassword);
   registrationPage.submit();
 }
示例#2
0
 @Step
 @Then(
     "they should see the error messages '$nameError', '$emailError', '$passwordError', '$confirmPasswordError'")
 public void checkErrorMessages(
     String nameError, String emailError, String passwordError, String confirmPasswordError) {
   assertTrue(registrationPage.isErrorDisplayed("name", nameError));
   assertTrue(registrationPage.isErrorDisplayed("email", emailError));
   assertTrue(registrationPage.isErrorDisplayed("password", passwordError));
   assertTrue(registrationPage.isErrorDisplayed("confirmPassword", confirmPasswordError));
 }
示例#3
0
 @Step
 @Then("they should see the destination page")
 public void checkDestinationPageOpening() {
   assertThat(registrationPage.getDriver().getCurrentUrl())
       .doesNotContain("/it-interview/register");
 }
示例#4
0
 @Step
 @Given("the user is on the registration page")
 public void openSignUpPage() {
   registrationPage.open();
 }