API Remove deprecated code

This commit is contained in:
Sabina Talipova 2022-11-25 13:46:44 +13:00
parent aa27715a11
commit 6403eda538
2 changed files with 1 additions and 31 deletions

View File

@ -544,9 +544,7 @@ It's based on the `vendor/bin/behat -di @cms` output.
Then /^the "(?P<checkbox>(?:[^"]|\\")*)" checkbox should not be checked$/
- 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$/
@ -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 a "([^"]*)" notice$/
Then /^I should see a "([^"]*)" message$/
Given /^I should see a "([^"]*)" button in CMS Content Toolbar$/

View File

@ -2,7 +2,6 @@
namespace SilverStripe\BehatExtension\Context;
use SilverStripe\Dev\Deprecation;
use Exception;
use InvalidArgumentException;
use Behat\Behat\Context\Context;
@ -619,31 +618,6 @@ JS;
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.
*