1 | <?php |
||
10 | class Create extends Authenticated |
||
11 | { |
||
12 | protected $select2; |
||
13 | |||
14 | public function __construct(AcceptanceTester $I) |
||
20 | |||
21 | /** |
||
22 | * Tries to create a new simple bill without any data. |
||
23 | * |
||
24 | * Expects blank field errors. |
||
25 | * @throws \Exception |
||
26 | */ |
||
27 | public function createBillWithoutData(): void |
||
36 | |||
37 | /** |
||
38 | * Tries to create a new simple bill with all the necessary data. |
||
39 | * |
||
40 | * Expects successful bill creation. |
||
41 | * |
||
42 | * @param array $billData |
||
43 | */ |
||
44 | public function createBill(array $billData): void |
||
53 | |||
54 | /** |
||
55 | * Tries to create a new detailed bill without detailed data. |
||
56 | * |
||
57 | * Expects blank field errors. |
||
58 | * |
||
59 | * @param array $billData |
||
60 | * @throws \Exception |
||
61 | */ |
||
62 | public function createDetailedBillWithoutDetailedData(array $billData): void |
||
72 | |||
73 | /** |
||
74 | * Tries to create a new detailed bill with all the necessary data. |
||
75 | * |
||
76 | * Expects successful bill creation. |
||
77 | * Also checks Sum field mismatch error. |
||
78 | * |
||
79 | * @param array $billData |
||
80 | * @throws \Exception |
||
81 | */ |
||
82 | public function createDetailedBill(array $billData): void |
||
101 | |||
102 | /** |
||
103 | * Fills basic bill fields. |
||
104 | * |
||
105 | * @param array $billData |
||
106 | */ |
||
107 | protected function fillBillFields(array $billData): void |
||
124 | |||
125 | /** |
||
126 | * Fills detailed bill fields. |
||
127 | * |
||
128 | * @param array $billData |
||
129 | * @param int $n number of detailed block |
||
130 | */ |
||
131 | protected function fillDetailingFields(array $billData, $n): void |
||
147 | |||
148 | protected function clickSaveButton(): void |
||
152 | |||
153 | protected function clickDetailingButton(): void |
||
158 | |||
159 | /** |
||
160 | * Checks whether a bill was successfully created. |
||
161 | */ |
||
162 | protected function seeBillWasCreated(): void |
||
169 | |||
170 | /** |
||
171 | * Looking for blank errors for the given fields. |
||
172 | * |
||
173 | * @param array $fieldsList |
||
174 | * @throws \Exception |
||
175 | */ |
||
176 | protected function seeBlankFieldsError(array $fieldsList): void |
||
182 | } |
||
183 |