| @@ 11-50 (lines=40) @@ | ||
| 8 | use hipanel\modules\finance\tests\_support\Page\price\certificate\Update as PriceCertificateUpdate; |
|
| 9 | use hipanel\tests\_support\Step\Acceptance\Manager; |
|
| 10 | ||
| 11 | class CertificateCrudCest |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @var string |
|
| 15 | */ |
|
| 16 | private $id; |
|
| 17 | ||
| 18 | /** |
|
| 19 | * @var array |
|
| 20 | */ |
|
| 21 | private $fields; |
|
| 22 | ||
| 23 | public function ensureThatICanCreateTariffPlan(Manager $I): void |
|
| 24 | { |
|
| 25 | $this->fields = [ |
|
| 26 | 'name' => uniqid(), |
|
| 27 | 'type' => 'Certificate tariff', |
|
| 28 | 'client' => '[email protected]', |
|
| 29 | 'currency' => 'USD', |
|
| 30 | 'note' => 'test note', |
|
| 31 | ]; |
|
| 32 | $page = new PlanCreatePage($I, $this->fields); |
|
| 33 | $this->id = $page->createPlan(); |
|
| 34 | } |
|
| 35 | ||
| 36 | public function ensureThatICanAddPrices(Manager $I): void |
|
| 37 | { |
|
| 38 | $I->needPage(Url::to(['@plan/view', 'id' => $this->id])); |
|
| 39 | $I->see('No prices found'); |
|
| 40 | $price = new PriceCertificateCreate($I, $this->id); |
|
| 41 | $price->addPrices('Certificate tariff'); |
|
| 42 | $price->ensureThereNoSuggestions('Certificate tariff'); |
|
| 43 | } |
|
| 44 | ||
| 45 | public function ensureICanUpdatePrices(Manager $I): void |
|
| 46 | { |
|
| 47 | $price = new PriceCertificateUpdate($I, $this->id); |
|
| 48 | $price->updatePrices(); |
|
| 49 | } |
|
| 50 | } |
|
| 51 | ||
| @@ 11-50 (lines=40) @@ | ||
| 8 | use hipanel\modules\finance\tests\_support\Page\price\certificate\Update as PriceDomainUpdate; |
|
| 9 | use hipanel\tests\_support\Step\Acceptance\Manager; |
|
| 10 | ||
| 11 | class DomainCrudCest |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @var string |
|
| 15 | */ |
|
| 16 | private $id; |
|
| 17 | ||
| 18 | /** |
|
| 19 | * @var array |
|
| 20 | */ |
|
| 21 | private $fields; |
|
| 22 | ||
| 23 | public function ensureThatICanCreateTariffPlan(Manager $I): void |
|
| 24 | { |
|
| 25 | $this->fields = [ |
|
| 26 | 'name' => uniqid(), |
|
| 27 | 'type' => 'Domain tariff', |
|
| 28 | 'client' => '[email protected]', |
|
| 29 | 'currency' => 'USD', |
|
| 30 | 'note' => 'test note', |
|
| 31 | ]; |
|
| 32 | $page = new PlanCreatePage($I, $this->fields); |
|
| 33 | $this->id = $page->createPlan(); |
|
| 34 | } |
|
| 35 | ||
| 36 | public function ensureThatICanAddPrices(Manager $I): void |
|
| 37 | { |
|
| 38 | $I->needPage(Url::to(['@plan/view', 'id' => $this->id])); |
|
| 39 | $I->see('No prices found'); |
|
| 40 | $price = new PriceDomainCreate($I, $this->id); |
|
| 41 | $price->addPrices('Default Tariff'); |
|
| 42 | $price->ensureThereNoSuggestions('Default Tariff'); |
|
| 43 | } |
|
| 44 | ||
| 45 | public function ensureICanUpdatePrices(Manager $I): void |
|
| 46 | { |
|
| 47 | $price = new PriceDomainUpdate($I, $this->id); |
|
| 48 | $price->updatePrices(); |
|
| 49 | } |
|
| 50 | } |
|
| 51 | ||