| @@ 8-43 (lines=36) @@ | ||
| 5 | use hipanel\helpers\Url; |
|
| 6 | use hipanel\tests\_support\Step\Acceptance\Client; |
|
| 7 | ||
| 8 | class AccountRechargingCest |
|
| 9 | { |
|
| 10 | public function ensureIndexPageWorks(Client $I) |
|
| 11 | { |
|
| 12 | $I->login(); |
|
| 13 | $I->needPage(Url::to('@pay/deposit')); |
|
| 14 | $I->see('Account recharging', 'h1'); |
|
| 15 | $this->ensureICanSeeDepositBox($I); |
|
| 16 | $this->ensureICanSeePaymentBox($I); |
|
| 17 | $this->ensureICanSeeWarningBox($I); |
|
| 18 | } |
|
| 19 | ||
| 20 | private function ensureICanSeeDepositBox(Client $I) |
|
| 21 | { |
|
| 22 | $url = Url::to('@pay/deposit'); |
|
| 23 | $form = "//form[@action='$url']"; |
|
| 24 | $I->see('Amount', "$form/label"); |
|
| 25 | $I->seeElement('input', ['id' => 'depositform-amount']); |
|
| 26 | $text = 'Enter the amount of the replenishment in dollars. For example: 8.79'; |
|
| 27 | $I->see($text, $form); |
|
| 28 | $I->see('Proceed', "$form/button[@type='submit']"); |
|
| 29 | } |
|
| 30 | ||
| 31 | private function ensureICanSeePaymentBox(Client $I) |
|
| 32 | { |
|
| 33 | $I->see('Available payment methods', 'h3'); |
|
| 34 | $I->see('We support fully automatic account depositing with the following payment systems:'); |
|
| 35 | } |
|
| 36 | ||
| 37 | private function ensureICanSeeWarningBox(Client $I) |
|
| 38 | { |
|
| 39 | $I->see('Important information', 'h4'); |
|
| 40 | $text = 'Remember to return to the site after successful payment!'; |
|
| 41 | $I->see($text, 'p'); |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||
| @@ 8-43 (lines=36) @@ | ||
| 5 | use hipanel\helpers\Url; |
|
| 6 | use hipanel\tests\_support\Step\Acceptance\Seller; |
|
| 7 | ||
| 8 | class AccountRechargingCest |
|
| 9 | { |
|
| 10 | public function ensureIndexPageWorks(Seller $I) |
|
| 11 | { |
|
| 12 | $I->login(); |
|
| 13 | $I->needPage(Url::to('@pay/deposit')); |
|
| 14 | $I->see('Account recharging', 'h1'); |
|
| 15 | $this->ensureICanSeeDepositBox($I); |
|
| 16 | $this->ensureICanSeePaymentBox($I); |
|
| 17 | $this->ensureICanSeeWarningBox($I); |
|
| 18 | } |
|
| 19 | ||
| 20 | private function ensureICanSeeDepositBox(Seller $I) |
|
| 21 | { |
|
| 22 | $url = Url::to('@pay/deposit'); |
|
| 23 | $form = "//form[@action='$url']"; |
|
| 24 | $I->see('Amount', "$form/label"); |
|
| 25 | $I->seeElement('input', ['id' => 'depositform-amount']); |
|
| 26 | $text = 'Enter the amount of the replenishment in dollars. For example: 8.79'; |
|
| 27 | $I->see($text, $form); |
|
| 28 | $I->see('Proceed', "$form/button[@type='submit']"); |
|
| 29 | } |
|
| 30 | ||
| 31 | private function ensureICanSeePaymentBox(Seller $I) |
|
| 32 | { |
|
| 33 | $I->see('Available payment methods', 'h3'); |
|
| 34 | $I->see('We support fully automatic account depositing with the following payment systems:'); |
|
| 35 | } |
|
| 36 | ||
| 37 | private function ensureICanSeeWarningBox(Seller $I) |
|
| 38 | { |
|
| 39 | $I->see('Important information', 'h4'); |
|
| 40 | $text = 'Remember to return to the site after successful payment!'; |
|
| 41 | $I->see($text, 'p'); |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||