/**
  * @param \codeception_frontend\AcceptanceTester $I
  * @param \Codeception\Scenario $scenario
  */
 public function testUserSignup($I, $scenario)
 {
     $I->wantTo('ensure that signup works');
     $signupPage = SignupPage::openBy($I);
     $I->see('Signup', 'h1');
     $I->see('Please fill out the following fields to signup:');
     $I->amGoingTo('submit signup form with no data');
     $signupPage->submit([]);
     $I->expectTo('see validation errors');
     $I->see('Username cannot be blank.', '.help-block');
     $I->see('Email cannot be blank.', '.help-block');
     $I->see('Password cannot be blank.', '.help-block');
     $I->amGoingTo('submit signup form with not correct email');
     $signupPage->submit(['username' => 'tester', 'email' => 'tester.email', 'password' => 'tester_password']);
     $I->expectTo('see that email address is wrong');
     $I->dontSee('Username cannot be blank.', '.help-block');
     $I->dontSee('Password cannot be blank.', '.help-block');
     $I->see('Email is not a valid email address.', '.help-block');
     $I->amGoingTo('submit signup form with correct email');
     $signupPage->submit(['username' => 'tester', 'email' => '*****@*****.**', 'password' => 'tester_password']);
     $I->expectTo('see that user logged in');
     $I->seeLink('tester');
 }
Example #2
0
 /**
  * @param \codeception_frontend\AcceptanceTester $I
  * @param \Codeception\Scenario $scenario
  */
 public function testUserSignup($I, $scenario)
 {
     $I->wantTo('asegurar que la pagina de registrarse funciona');
     $signupPage = RegistrarsePage::openBy($I);
     $I->see('¿Todavía no te has registrado? ¡Hazlo gratis!', 'h5');
     $I->see('No publicamos nada sin tu consentimiento');
     $I->amGoingTo('intentar registrarme sin poner mis datos');
     $signupPage->submit([]);
     $I->expectTo('ver errores de validacion');
     $I->see('Nombre y Apellidos no puede estar vacío.', '.error-block');
     $I->see('Correo no puede estar vacío.', '.error-block');
     $I->see('Contraseña no puede estar vacío.', '.error-block');
     $I->see('Debes aceptar las condiciones de uso Signup.', '.error-block');
     $I->amGoingTo('intentar registrarme con correo incorrecto');
     $signupPage->submit(['nombre' => 'tester', 'correo' => 'tester.email', 'clave' => 'tester_password']);
     $I->expectTo('ver que el correo esta mal');
     $I->see('Nombre y Apellidos no puede estar vacío.', '.error-block');
     $I->see('Correo no es una dirección de correo válida.', '.error-block');
     $I->see('Email is not a valid email address.', '.error-block');
     $I->amGoingTo('registrarme con correo valido');
     $signupPage->submit(['nombre' => 'tester', 'correo' => '*****@*****.**', 'clave' => 'tester_password']);
     //        $I->expectTo('see that user logged in');
     //        $I->seeLink('Logout (tester)');
 }