1 | <?php |
||
21 | class ListContext extends AbstractContext |
||
22 | { |
||
23 | /** |
||
24 | * @var DefaultPage |
||
25 | */ |
||
26 | private $defaultPage; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | private $selectedRows = []; |
||
32 | |||
33 | public function __construct(DefaultPage $defaultPage) |
||
37 | |||
38 | /** |
||
39 | * @beforeScenario |
||
40 | */ |
||
41 | public function clearSelectedRows(): void |
||
45 | |||
46 | /** |
||
47 | * @When I check the row :name |
||
48 | */ |
||
49 | public function iCheckTheRow($name) |
||
53 | |||
54 | /** |
||
55 | * @When /^I press checkbox in first column in first row$/ |
||
56 | */ |
||
57 | public function iPressCheckboxInFirstColumnInFirstRow() |
||
61 | |||
62 | /** |
||
63 | * @When /^I press checkbox in first column header$/ |
||
64 | */ |
||
65 | public function iPressCheckboxInFirstColumnHeader() |
||
71 | |||
72 | /** |
||
73 | * @Given I press :action link in actions column of first element at list |
||
74 | */ |
||
75 | public function iPressLinkInColumnOfFirstElementAtList($link) |
||
79 | |||
80 | /** |
||
81 | * @Given I perform the batch action :action |
||
82 | */ |
||
83 | public function iPerformBatchAction($action) |
||
107 | |||
108 | /** |
||
109 | * @Then /^I should see list with following columns$/ |
||
110 | */ |
||
111 | public function iShouldSeeListWithFollowingColumns(TableNode $table) |
||
128 | |||
129 | /** |
||
130 | * @Given /^there are (\d+) elements at list$/ |
||
131 | * @Given /^there is (\d+) element at list$/ |
||
132 | * @Then /^there should be (\d+) elements at list$/ |
||
133 | * @Then /^there should be (\d+) element at list$/ |
||
134 | */ |
||
135 | public function thereShouldBeElementsAtList($elemetsCount) |
||
139 | |||
140 | /** |
||
141 | * @Given /^"([^"]*)" column is editable$/ |
||
142 | */ |
||
143 | public function columnIsEditable($columnHeader) |
||
147 | |||
148 | /** |
||
149 | * @Then I should not see pagination on page :page |
||
150 | */ |
||
151 | public function iShouldNotSeePagination(Page $page) |
||
155 | |||
156 | /** |
||
157 | * @Given /^I clicked "([^"]*)" in "([^"]*)" column in first row$/ |
||
158 | * @When /^I click "([^"]*)" in "([^"]*)" column in first row$/ |
||
159 | */ |
||
160 | public function iClickInColumnInFirstRow($link, $columnHeader) |
||
164 | |||
165 | /** |
||
166 | * @Given /^I clicked edit in "([^"]*)" column in first row$/ |
||
167 | * @When /^I click edit in "([^"]*)" column in first row$/ |
||
168 | */ |
||
169 | public function iClickEditInColumnInFirstRow($columnHeader) |
||
175 | |||
176 | /** |
||
177 | * @Then /^popover with "([^"]*)" field in form should appear$/ |
||
178 | */ |
||
179 | public function popoverWithFieldInFormShouldAppear($newsTitle) |
||
185 | |||
186 | /** |
||
187 | * @Then /^popover with empty date field in form should appear$/ |
||
188 | */ |
||
189 | public function popoverWithEmptyDateFieldInFormShouldAppear() |
||
195 | /** |
||
196 | * @Then /^popover should not be visible anymore$/ |
||
197 | */ |
||
198 | public function popoverShouldNotBeVisibleAnymore() |
||
202 | |||
203 | /** |
||
204 | * @When /^I fill "([^"]*)" field at popover with "([^"]*)" value$/ |
||
205 | */ |
||
206 | public function iFillFieldAtPopoverWithValue($field, $value) |
||
210 | |||
211 | /** |
||
212 | * @Given /^I press "([^"]*)" at popover$/ |
||
213 | */ |
||
214 | public function iPressAtPopover($button) |
||
218 | |||
219 | /** |
||
220 | * @When /^I click X at popover$/ |
||
221 | */ |
||
222 | public function iClickXAtPopover() |
||
231 | |||
232 | private function getListElement(): ListElement |
||
236 | } |
||
237 |