/** * * @param \codeception_frontend\FunctionalTester $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 is created'); $I->seeRecord('common\\models\\User', ['username' => 'tester', 'email' => '*****@*****.**']); $I->expectTo('see that user logged in'); $I->seeLink('Logout (tester)'); }
/** * * @param \codeception_frontend\FunctionalTester $I * @param \Codeception\Scenario $scenario */ public function testUserSignup($I, $scenario) { $I->wantTo('ensure that signup works'); $signupPage = SignupPage::openBy($I); $I->see('Регистрация', 'h1'); $I->see('Пожалуйста заполните все поля формы:'); $I->amGoingTo('submit signup form with no data'); $signupPage->submit([]); $I->expectTo('see validation errors'); $I->see('Необходимо заполнить «Логин».', '.help-block'); $I->see('Необходимо заполнить «Email».', '.help-block'); $I->see('Необходимо заполнить «Пароль».', '.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('Необходимо заполнить «Логин».', '.help-block'); $I->dontSee('Необходимо заполнить «Пароль».', '.help-block'); $I->see('Значение «Email» не является правильным email адресом.', '.help-block'); $I->amGoingTo('submit signup form with correct email'); /*$signupPage->submit([ 'username' => 'tester', 'email' => '*****@*****.**', 'password' => 'tester_password', 'passwordRepeat' => 'tester_password', 'captcha' => 'testme', ]); $I->dontSee('The verification code is incorrect.', '.help-block');*/ $I->expectTo('see that user is created'); $I->seeRecord('common\\models\\ar\\User', ['username' => 'tester', 'email' => '*****@*****.**']); $I->expectTo('see that user logged in'); $I->seeLink('Выход (tester)'); }
/** * * @param \codeception_frontend\FunctionalTester $I * @param FunctionalTester $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'); //$I->see('Signup', 'h1'); //$I->see('Please fill out the following fields to signup:'); $I->amGoingTo('submit signup form with no configs'); $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->see('Необходимо заполнить «Имя пользователя (логин)».', '.help-block'); $I->see('Необходимо заполнить «Email».', '.help-block'); $I->see('Необходимо заполнить «Пароль».', '.help-block'); $I->see('Необходимо заполнить «Повторно пароль».', '.help-block'); $I->see('Необходимо заполнить «Фамилия».', '.help-block'); $I->see('Необходимо заполнить «Подразделение».', '.help-block'); $I->see('Необходимо заполнить «Должность».', '.help-block'); $I->see('Необходимо заполнить «Внутренний телефон».', '.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'); $I->dontSee('Необходимо заполнить «Имя пользователя (логин)».', '.help-block'); $I->dontSee('Необходимо заполнить «Пароль».', '.help-block'); $I->see('Значение «Email» не является правильным email адресом.', '.help-block'); $I->amGoingTo('submit signup form with not correct password_repeat'); $signupPage->submit(['username' => 'tester', 'email' => '*****@*****.**', 'password' => 'tester_password', 'password_repeat' => 'password_tester']); $I->expectTo('see that password_repeat is wrong'); $I->see('Значение «Пароль» должно быть повторено в точности.', '.help-block'); $I->amGoingTo('submit signup form with correct data'); $signupPage->submit(['username' => 'tester', 'email' => '*****@*****.**', 'password' => 'tester_password', 'password_repeat' => 'tester_password', 'lastName' => 'LastName', 'firstName' => 'FirstName', 'middleName' => 'MiddleName', 'division' => 'Division', 'post' => 'Post', 'phone' => '12-34', 'mobile' => '(910) 123-45-67']); $I->expectTo('see that user is created'); $I->seeRecord('common\\models\\User', ['username' => 'tester', 'email' => '*****@*****.**']); $I->seeRecord('common\\models\\UserProfile', ['lastName' => 'LastName', 'firstName' => 'FirstName', 'middleName' => 'MiddleName', 'division' => 'Division', 'post' => 'Post', 'phone' => '12-34', 'mobile' => '(910) 123-45-67']); $I->expectTo('see that user logged in'); $I->seeLink('Logout (tester)'); }
/** * * @param \codeception_frontend\FunctionalTester $I * @param \Codeception\Scenario $scenario */ public function testRegistroUsuario($I, $scenario) { $I->wantTo('asegurarme que pagina crear cuenta 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)'); }
/** * * @param \codeception_frontend\FunctionalTester $I * @param \Codeception\Scenario $scenario */ public function testRefSettings($I, $scenario) { $I->wantTo('ensure that signup works'); $signupPage = SettingsPage::openBy($I); $I->see('Personal settings', 'h3'); $I->seeLink('Reference'); $I->click('Reference'); $I->seeLink('Block state'); $I->click('Block state'); $I->see('Block state', 'h3'); $I->click('Back to reference'); $I->seeLink('Visual style'); $I->click('Visual style'); $I->see('Visual style', 'h3'); $I->click('Back to reference'); $I->seeLink('Role types'); $I->click('Role types'); $I->see('Role types', 'h3'); $I->click('Back to reference'); $I->seeLink('Icons list'); $I->click('Icons list'); $I->see('Icons list', 'h3'); $I->click('Back to reference'); }