mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-09-28 20:29:36 +02:00
API Remove deprecated code
This commit is contained in:
parent
aa27715a11
commit
6403eda538
@ -544,8 +544,6 @@ It's based on the `vendor/bin/behat -di @cms` output.
|
|||||||
Then /^the "(?P<checkbox>(?:[^"]|\\")*)" checkbox should not be checked$/
|
Then /^the "(?P<checkbox>(?:[^"]|\\")*)" checkbox should not be checked$/
|
||||||
- Checks, that checkbox with specified in|name|label|value is unchecked.
|
- Checks, that checkbox with specified in|name|label|value is unchecked.
|
||||||
|
|
||||||
Given /^(?:|I )attach the file "(?P[^"]*)" to "(?P<field>(?:[^"]|\\")*)" with HTML5$/
|
|
||||||
|
|
||||||
When /^I fill in the "(?P<field>([^"]*))" HTML field with "(?P<value>([^"]*))"$/
|
When /^I fill in the "(?P<field>([^"]*))" HTML field with "(?P<value>([^"]*))"$/
|
||||||
|
|
||||||
When /^I fill in "(?P<value>([^"]*))" for the "(?P<field>([^"]*))" HTML field$/
|
When /^I fill in "(?P<value>([^"]*))" for the "(?P<field>([^"]*))" HTML field$/
|
||||||
@ -604,8 +602,6 @@ It's based on the `vendor/bin/behat -di @cms` output.
|
|||||||
|
|
||||||
Then /^I should see the CMS$/
|
Then /^I should see the CMS$/
|
||||||
|
|
||||||
Then /^I should see a "([^"]*)" notice$/
|
|
||||||
|
|
||||||
Then /^I should see a "([^"]*)" message$/
|
Then /^I should see a "([^"]*)" message$/
|
||||||
|
|
||||||
Given /^I should see a "([^"]*)" button in CMS Content Toolbar$/
|
Given /^I should see a "([^"]*)" button in CMS Content Toolbar$/
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace SilverStripe\BehatExtension\Context;
|
namespace SilverStripe\BehatExtension\Context;
|
||||||
|
|
||||||
use SilverStripe\Dev\Deprecation;
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use Behat\Behat\Context\Context;
|
use Behat\Behat\Context\Context;
|
||||||
@ -619,31 +618,6 @@ JS;
|
|||||||
return $driver->getWebDriver();
|
return $driver->getWebDriver();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @Given /^(?:|I )attach the file "(?P<path>[^"]*)" to "(?P<field>(?:[^"]|\\")*)" with HTML5$/
|
|
||||||
* @param string $field
|
|
||||||
* @param string $path
|
|
||||||
* @return Call\Given
|
|
||||||
*
|
|
||||||
* @deprecated 4.5.0 Use iAttachTheFileToTheField() instead
|
|
||||||
*/
|
|
||||||
public function iAttachTheFileTo($field, $path)
|
|
||||||
{
|
|
||||||
Deprecation::notice('4.5.0', 'Use iAttachTheFileToTheField() instead');
|
|
||||||
// Remove wrapped button styling to make input field accessible to Selenium
|
|
||||||
$js = <<<JS
|
|
||||||
let input = jQuery('[name="$field"]');
|
|
||||||
if(input.closest('.ss-uploadfield-item-info').length) {
|
|
||||||
while(!input.parent().is('.ss-uploadfield-item-info')) input = input.unwrap();
|
|
||||||
}
|
|
||||||
JS;
|
|
||||||
|
|
||||||
$this->getSession()->executeScript($js);
|
|
||||||
$this->getSession()->wait(1000);
|
|
||||||
|
|
||||||
return $this->getMainContext()->attachFileToField($field, $path);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Select an individual input from within a group, matched by the top-most label.
|
* Select an individual input from within a group, matched by the top-most label.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user