| @@ 28-40 (lines=13) @@ | ||
| 25 | /** |
|
| 26 | * @When /^I (?:click|press|follow) "([^"]*)" near "([^"]*)"$/ |
|
| 27 | */ |
|
| 28 | public function iClickNear($button, $value) |
|
| 29 | { |
|
| 30 | $selector = sprintf('table tbody tr:contains("%s")', $value); |
|
| 31 | $tr = $this->assertSession()->elementExists('css', $selector); |
|
| 32 | ||
| 33 | $locator = sprintf('button:contains("%s")', $button); |
|
| 34 | ||
| 35 | if ($tr->has('css', $locator)) { |
|
| 36 | $tr->find('css', $locator)->press(); |
|
| 37 | } else { |
|
| 38 | $tr->clickLink($button); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||
| 42 | /** |
|
| 43 | * @Then /^I should see "([^"]*)" near "([^"]*)"$/ |
|
| @@ 167-179 (lines=13) @@ | ||
| 164 | /** |
|
| 165 | * @When /^I (?:click|press|follow) "([^"]*)" near "([^"]*)"$/ |
|
| 166 | */ |
|
| 167 | public function iClickNear($button, $value) |
|
| 168 | { |
|
| 169 | $selector = sprintf('.server-list .server-item:contains("%s")', $value); |
|
| 170 | $item = $this->assertSession()->elementExists('css', $selector); |
|
| 171 | ||
| 172 | $locator = sprintf('button:contains("%s")', $button); |
|
| 173 | ||
| 174 | if ($item->has('css', $locator)) { |
|
| 175 | $item->find('css', $locator)->press(); |
|
| 176 | } else { |
|
| 177 | $item->clickLink($button); |
|
| 178 | } |
|
| 179 | } |
|
| 180 | ||
| 181 | /** |
|
| 182 | * @Then /^I should be on the ftp page of ([^""]*) "([^""]*)"$/ |
|