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.

SignupPage.php 852B

8 年之前
1 年之前
8 年之前
1 年之前
8 年之前
1 年之前
8 年之前
1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace tests\codeception\frontend\_pages;
  3. use tests\codeception\common\_pages\MyBasePage;
  4. /**
  5. * Represents signup page
  6. * @property \codeception_frontend\AcceptanceTester|\codeception_frontend\FunctionalTester $actor
  7. */
  8. class SignupPage extends MyBasePage
  9. {
  10. public $route = 'site/signup';
  11. /**
  12. * @param array $signupData
  13. */
  14. public function submit(array $signupData)
  15. {
  16. foreach ($signupData as $field => $value) {
  17. $selector = '[name="SignupForm[' . $field . ']"]';
  18. if($field == 'id_tax_rate_default' || $field == 'id_producer') {
  19. $this->actor->selectOption('select'.$selector, $value);
  20. }
  21. else {
  22. $this->actor->fillField('input'.$selector, $value);
  23. }
  24. }
  25. $this->actor->click('signup-button');
  26. }
  27. }