You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UserProfileCept.php 866B

12345678910111213141516171819202122232425262728
  1. <?php
  2. use tests\codeception\common\_pages\LoginPage;
  3. use tests\codeception\frontend\_pages\SignupPage;
  4. use tests\codeception\frontend\_pages\UserProfilePage;
  5. use tests\codeception\frontend\FunctionalTester;
  6. /* @var $scenario Codeception\Scenario */
  7. $I = new FunctionalTester($scenario);
  8. $I->amLoggedInAs(1);
  9. $userProfilePage = UserProfilePage::openBy($I);
  10. $I->wantTo("m'assurer que l'édition du profil de l'utilisateur fonctionne");
  11. $I->see('Mon profil', 'h1');
  12. $I->amGoingTo("modifier mon profil");
  13. $userProfilePage->submit([
  14. 'lastname' => 'Nom',
  15. 'name' => 'Prénom',
  16. 'phone' => '0600000000',
  17. 'email' => 'test@opendistrib.net',
  18. 'address' => 'Adresse',
  19. 'password_old' => 'password_0',
  20. 'password_new' => 'newpassword',
  21. 'password_new_confirm' => 'newpassword',
  22. ]);
  23. $I->see('Votre profil a bien été modifié', '.alert-success');