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 |
||
123 | |||
124 | /** |
||
125 | * Adds sum of each charge on page and returns it. |
||
126 | * |
||
127 | * @return int - total sum of charges |
||
128 | */ |
||
129 | public function getChargesTotalSum(): int |
||
143 | |||
144 | public function deleteLastCharge() |
||
148 | |||
149 | /** |
||
150 | * Checks whether a bill was created successfully and returns its id. |
||
151 | * |
||
152 | * @return string - id of created bill. |
||
153 | */ |
||
154 | public function seeBillWasCreated(): string |
||
163 | |||
164 | /** |
||
165 | * Looking for blank errors for the given fields. |
||
166 | * |
||
167 | * @param array $fieldsList |
||
168 | * @throws \Exception |
||
169 | */ |
||
170 | public function containsBlankFieldsError(array $fieldsList): void |
||
176 | |||
177 | /** |
||
178 | * Looking for sum mismatch errors. |
||
179 | * |
||
180 | * @throws \Exception |
||
181 | */ |
||
182 | public function containsSumMismatch(): void |
||
186 | |||
187 | /** |
||
188 | * Saves created bill. |
||
189 | */ |
||
190 | public function save(): void |
||
194 | } |
||
195 |