|
@@ 62-72 (lines=11) @@
|
| 59 |
|
* @When /^I fill in the "(?P<field>(?:[^"]|\\")*)" HTML field with "(?P<value>(?:[^"]|\\")*)"$/ |
| 60 |
|
* @When /^I fill in "(?P<value>(?:[^"]|\\")*)" for the "(?P<field>(?:[^"]|\\")*)" HTML field$/ |
| 61 |
|
*/ |
| 62 |
|
public function stepIFillInTheHtmlFieldWith($field, $value) |
| 63 |
|
{ |
| 64 |
|
$inputField = $this->getHtmlField($field); |
| 65 |
|
$value = $this->fixStepArgument($value); |
| 66 |
|
|
| 67 |
|
$this->getSession()->evaluateScript(sprintf( |
| 68 |
|
"jQuery('#%s').entwine('ss').getEditor().setContent('%s')", |
| 69 |
|
$inputField->getAttribute('id'), |
| 70 |
|
addcslashes($value, "'") |
| 71 |
|
)); |
| 72 |
|
} |
| 73 |
|
|
| 74 |
|
/** |
| 75 |
|
* @When /^I append "(?P<value>(?:[^"]|\\")*)" to the "(?P<field>(?:[^"]|\\")*)" HTML field$/ |
|
@@ 77-87 (lines=11) @@
|
| 74 |
|
/** |
| 75 |
|
* @When /^I append "(?P<value>(?:[^"]|\\")*)" to the "(?P<field>(?:[^"]|\\")*)" HTML field$/ |
| 76 |
|
*/ |
| 77 |
|
public function stepIAppendTotheHtmlField($field, $value) |
| 78 |
|
{ |
| 79 |
|
$inputField = $this->getHtmlField($field); |
| 80 |
|
$value = $this->fixStepArgument($value); |
| 81 |
|
|
| 82 |
|
$this->getSession()->evaluateScript(sprintf( |
| 83 |
|
"jQuery('#%s').entwine('ss').getEditor().insertContent('%s')", |
| 84 |
|
$inputField->getAttribute('id'), |
| 85 |
|
addcslashes($value, "'") |
| 86 |
|
)); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
/** |
| 90 |
|
* @Then /^the "(?P<locator>(?:[^"]|\\")*)" HTML field should(?P<negative> not? |\s*)contain "(?P<html>.*)"$/ |