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.

50 lines
1.3KB

  1. <?php
  2. use tests\codeception\common\_pages\LoginPage;
  3. use tests\codeception\frontend\_pages\SignupPage;
  4. use tests\codeception\frontend\FunctionalTester;
  5. /* @var $scenario Codeception\Scenario */
  6. $I = new FunctionalTester($scenario);
  7. $signupPage = SignupPage::openBy($I);
  8. $I->wantTo("m'assurer que le formulaire d'inscription fonctionne");
  9. $I->see('Inscription', 'h1');
  10. $I->amGoingTo("m'inscrire en tant que client");
  11. $signupPage->submit([
  12. 'email' => 'testclient@opendistrib.net',
  13. 'password' => 'password',
  14. 'lastname' => 'Nom',
  15. 'name' => 'Prénom',
  16. 'phone' => '0600000000',
  17. 'option_user_producer' => 'user',
  18. 'id_producer' => '32',
  19. 'is_test' => 'isTest'
  20. ]);
  21. $I->see('Inscription confirmée', 'h1');
  22. $I->amOnPage('logout');
  23. $I->see('distribution alimentaire', 'h1');
  24. $I->amOnPage($signupPage->route);
  25. $I->amGoingTo("m'inscrire en tant que producteur");
  26. $signupPage->submit([
  27. 'email' => 'testproducteur@opendistrib.net',
  28. 'password' => 'password',
  29. 'lastname' => 'Nom',
  30. 'name' => 'Prénom',
  31. 'phone' => '0600000000',
  32. 'option_user_producer' => 'producer',
  33. 'name_producer' => 'Producteur',
  34. 'type' => 'Boulangerie',
  35. 'postcode' => '25000',
  36. 'city' => 'Besançon',
  37. 'id_tax_rate_default' => '1',
  38. 'cgv' => '1',
  39. 'is_test' => 'isTest'
  40. ]);
  41. $I->see('Inscription confirmée', 'h1');