Exemplo n.º 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();
 }
Exemplo n.º 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));
 }
Exemplo n.º 3
0
 @Step
 @Then("they should see the destination page")
 public void checkDestinationPageOpening() {
   assertThat(registrationPage.getDriver().getCurrentUrl())
       .doesNotContain("/it-interview/register");
 }
Exemplo n.º 4
0
 @Step
 @Given("the user is on the registration page")
 public void openSignUpPage() {
   registrationPage.open();
 }