Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Jan 18, 2024
1 parent 1b179d1 commit aa763bc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/lib/Browser/Context/DebuggingContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,32 @@ public function __construct(
*/
public function logStartingScenario(BeforeScenarioScope $scope)
{
$this->session->executeScript(sprintf('console.error("Starting Scenario:: %s")', $scope->getScenario()->getTitle()));
$text = sprintf('console.error("Starting Scenario: %s")', $scope->getScenario()->getTitle());
$this->session->executeScript($text);
$this->logger->error(sprintf('Behat: Starting Scenario "%s"', $scope->getScenario()->getTitle()));
}

/** @BeforeStep
*/
public function logStartingStep(BeforeStepScope $scope)
{
$this->session->executeScript(sprintf('console.error("Starting Step: %s")', $scope->getStep()->getText()));
// $this->session->executeScript(sprintf('console.error("Starting Step: %s")', $scope->getStep()->getText()));
$this->logger->error(sprintf('Behat: Starting Step "%s"', $scope->getStep()->getText()));
}

/** @AfterScenario
*/
public function logEndingScenario(AfterScenarioScope $scope)
{
$this->session->executeScript(sprintf('console.error("Ending Scenario: %s")', $scope->getScenario()->getTitle()));
// $this->session->executeScript(sprintf('console.error("Ending Scenario: %s")', $scope->getScenario()->getTitle()));
$this->logger->error(sprintf('Behat: Ending Scenario "%s"', $scope->getScenario()->getTitle()));
}

/** @AfterStep
*/
public function logEndingStep(AfterStepScope $scope)
{
$this->session->executeScript(sprintf('console.error("Ending Step: %s")', $scope->getStep()->getText()));
// $this->session->executeScript(sprintf('console.error("Ending Step: %s")', $scope->getStep()->getText()));
$this->logger->error(sprintf('Behat: Ending Step "%s"', $scope->getStep()->getText()));

if ($scope->getTestResult()->isPassed()) {
Expand Down

0 comments on commit aa763bc

Please sign in to comment.