1 | <?php |
||
10 | class Create extends Authenticated |
||
11 | { |
||
12 | protected $select2; |
||
13 | |||
14 | public function __construct(AcceptanceTester $I) |
||
20 | |||
21 | public function createBill(array $billData, $chargesData = []): void |
||
27 | |||
28 | private function fillBillFields(array $billData, array $chargesData = []): void |
||
33 | |||
34 | /** |
||
35 | * @param array $billData |
||
36 | */ |
||
37 | public function fillMainBillFields(array $billData): void |
||
54 | |||
55 | /** |
||
56 | * @param int $sum |
||
57 | */ |
||
58 | public function setBillTotalSum(int $sum): void |
||
62 | |||
63 | public function addCharges(array $chargesData) |
||
69 | |||
70 | /** |
||
71 | * @param array $chargeData |
||
72 | */ |
||
73 | public function addCharge(array $chargeData): void |
||
80 | |||
81 | protected function clickAddChargeButton(): void |
||
86 | |||
87 | /** |
||
88 | * @param array $chargeData |
||
89 | */ |
||
90 | protected function fillChargeFields(array $chargeData): void |
||
112 | |||
113 | /** |
||
114 | * Checks whether a page contains the specified quantity of charges |
||
115 | * |
||
116 | * @param int $n - quantity of charges |
||
117 | */ |
||
118 | public function containsCharges(int $n): void |
||
122 | |||
123 | /** |
||
124 | * @return int - quantity of charges |
||
125 | */ |
||
126 | protected function getChargesQuantity(): int |
||
135 | |||
136 | /** |
||
137 | * Adds sum of each charge on page and returns it. |
||
138 | * |
||
139 | * @return int - total sum of charges |
||
140 | */ |
||
141 | public function getChargesTotalSum(): int |
||
155 | |||
156 | public function deleteLastCharge() |
||
160 | |||
161 | /** |
||
162 | * Checks whether a bill was created successfully and returns its id. |
||
163 | * |
||
164 | * @return string - id of created bill. |
||
165 | */ |
||
166 | public function seeBillWasCreated(): string |
||
175 | |||
176 | /** |
||
177 | * Looking for blank errors for the given fields. |
||
178 | * |
||
179 | * @param array $fieldsList |
||
180 | * @throws \Exception |
||
181 | */ |
||
182 | public function containsBlankFieldsError(array $fieldsList): void |
||
188 | |||
189 | /** |
||
190 | * Looking for sum mismatch errors. |
||
191 | * |
||
192 | * @throws \Exception |
||
193 | */ |
||
194 | public function containsSumMismatch(): void |
||
198 | |||
199 | /** |
||
200 | * Saves created bill. |
||
201 | */ |
||
202 | public function save(): void |
||
206 | } |
||
207 |