Blame view

tests/codeception/frontend/_pages/SignupPage.php 697 Bytes
4253cbec   root   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  <?php

  

  namespace tests\codeception\frontend\_pages;

  

  use \yii\codeception\BasePage;

  

  /**

   * Represents signup page

   * @property \codeception_frontend\AcceptanceTester|\codeception_frontend\FunctionalTester $actor

   */

  class SignupPage extends BasePage

  {

  

      public $route = 'site/signup';

  

      /**

       * @param array $signupData

       */

      public function submit(array $signupData)

      {

          foreach ($signupData as $field => $value) {

              $inputType = $field === 'body' ? 'textarea' : 'input';

              $this->actor->fillField($inputType . '[name="SignupForm[' . $field . ']"]', $value);

          }

          $this->actor->click('signup-button');

      }

  }