Ejemplo n.º 1
0
 @Test
 public void passwordDidntMatchError() {
   SignUpResultPage resultPage =
       signUpPage.signUp(correctName, password, incorrectConfirmPassword, "", correctEmail);
   Assert.assertEquals(
       Source.getValue("SignUpErrorPasswordDidntMatchError"), resultPage.getErrorText());
 }
Ejemplo n.º 2
0
  @Test
  public void nameIsTakenError() {
    String userName = getExistentName();
    Assume.assumeThat(userName, CoreMatchers.notNullValue());

    SignUpResultPage resultPage = signUpPage.signUp(userName, password, password, "", correctEmail);
    Assert.assertEquals(Source.getValue("SignUpErrorNameIsTakenError"), resultPage.getErrorText());
  }
Ejemplo n.º 3
0
 @Test
 public void unsuccessfulSignUp() {
   String incorrectUserName = RandomForPages.randomStringWithInvalidSymbols();
   thrown.expectMessage("Not on the right page");
   SignUpResultPage resultPage =
       signUpPage.signUp(incorrectUserName, password, password, "", correctEmail);
   Assert.assertEquals(" Oops!", resultPage.getMessageText());
 }
Ejemplo n.º 4
0
 @Override
 public void evaluate() throws Throwable {
   Assume.assumeTrue(SignUpPage.isSingUpWorked());
   if (authorize && authorizedUserName == null) {
     authorizedUserName = MethodsForTests.createUser(list);
     new LoginPage(driver)
         .get()
         .signIn(authorizedUserName, MethodsForTests.DEFAULT_PASSWORD);
   }
   if (!authorize) {
     driver.manage().deleteAllCookies();
   }
   signUpPage = new SignUpPage(driver).get();
   base.evaluate();
 }
Ejemplo n.º 5
0
 @Test
 public void passwordIsRequiredError() {
   SignUpResultPage resultPage = signUpPage.signUp(correctName, null, password, "", correctEmail);
   Assert.assertEquals(
       Source.getValue("SignUpErrorPasswordIsRequired"), resultPage.getErrorText());
 }
Ejemplo n.º 6
0
 @Test
 public void invalidEmailError() {
   SignUpResultPage resultPage =
       signUpPage.signUp(correctName, password, password, "", incorrectEmail);
   Assert.assertEquals(Source.getValue("SignUpErrorInvalidEmailError"), resultPage.getErrorText());
 }
Ejemplo n.º 7
0
 @Test
 public void successfulSignUp() {
   SignUpResultPage resultPage =
       signUpPage.signUp(correctName, password, password, "", correctEmail);
   Assert.assertEquals(Source.getValue("SignUpSuccess"), resultPage.getMessageText());
 }