Skip to content

Commit

Permalink
ScenarioTagTrait is deprecated. Use TagTrait instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrenssen committed Oct 1, 2018
1 parent 349d665 commit 0dd4198
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Drupal/DrupalExtension/Context/MinkContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
use Behat\Behat\Context\TranslatableContext;
use Behat\Mink\Exception\UnsupportedDriverActionException;
use Behat\MinkExtension\Context\MinkContext as MinkExtension;
use Drupal\DrupalExtension\ScenarioTagTrait;
use Drupal\DrupalExtension\TagTrait;

/**
* Extensions to the Mink Extension.
*/
class MinkContext extends MinkExtension implements TranslatableContext
{

use ScenarioTagTrait;
use TagTrait;

/**
* Returns list of definition translation resources paths.
Expand Down Expand Up @@ -95,8 +95,7 @@ public function assertEnterField($field, $value)
public function beforeJavascriptStep($event)
{
/** @var \Behat\Behat\Hook\Scope\BeforeStepScope $event */
$tags = $this->getCurrentScenarioTags($event);
if (!in_array('javascript', $tags)) {
if (!$this->hasTag('javascript')) {
return;
}
$text = $event->getStep()->getText();
Expand All @@ -113,8 +112,7 @@ public function beforeJavascriptStep($event)
public function afterJavascriptStep($event)
{
/** @var \Behat\Behat\Hook\Scope\BeforeStepScope $event */
$tags = $this->getCurrentScenarioTags($event);
if (!in_array('javascript', $tags)) {
if (!$this->hasTag('javascript')) {
return;
}
$text = $event->getStep()->getText();
Expand Down

0 comments on commit 0dd4198

Please sign in to comment.