Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
[Behat] Change 'iShouldSeeActionBarButton' exception for assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel committed Apr 20, 2016
1 parent e79ba26 commit 515e519
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Features/Context/SubContext/CommonActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,7 @@ private function goToContentWithPath($path)
public function iShouldSeeActionBarButton($buttonText)
{
$element = $this->getElementByText($buttonText, '.ez-actionbar-container .ez-action', '.action-label');
if (!$element) {
throw new \Exception("Action bar button '$buttonText' not found");
}
EzAssertion::assertSingleElement($buttonText, $element, null, 'Action bar button');
}

/**
Expand All @@ -334,9 +332,7 @@ public function iShouldSeeActionBarButton($buttonText)
public function iShouldNotSeeActionBarButton($buttonText)
{
$element = $this->getElementByText($buttonText, '.ez-actionbar-container .ez-action', '.action-label');
if ($element) {
throw new \Exception("Action bar button '$buttonText' was found");
}
EzAssertion::assertElementNotFound($buttonText, $element, null, 'Action bar button');
}

/**
Expand Down

0 comments on commit 515e519

Please sign in to comment.