Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AfterScenarioListener does not fire #76

Open
dwickstrom opened this issue Oct 5, 2014 · 4 comments
Open

AfterScenarioListener does not fire #76

dwickstrom opened this issue Oct 5, 2014 · 4 comments
Labels

Comments

@dwickstrom
Copy link

Hello,

I noticed that when running my test a second time, the fixtures from the previous run isn't cleaned and I get an "sql-duplicate-key-warning". Going through the code it looks like the AfterScenarioLister isn´t registered anywhere and subsequently never fires after the test suite is run.

@dwickstrom
Copy link
Author

Thinking more closely, this is perhaps something i should register myself in my BaseContext, no?

@dwickstrom dwickstrom reopened this Oct 5, 2014
@dwickstrom
Copy link
Author

"require": {
"magetest/magento-behat-extension": "dev-develop",
"behat/mink-extension": "",
"behat/mink-goutte-driver": "
",
"behat/mink-selenium2-driver": "*"
},

@jamescowie
Copy link
Member

I am testing a pull request that has been submitted that looks to resolve the afterScenario issue. Once this is merged it should resolve the issue we have here.

Can you provide the fixture you are using in the form on a sample scenario and step definitions and I will run this to ensure its all resolved.

@dwickstrom
Copy link
Author

I just used the standard one from the "How to"-section:

#@javascript
#Scenario: Test behat even works ok
 #   Given I am on the homepage
  #  Then I should see text "Home page"

  Scenario: Test if the fixtures work ok
    Given the following products exist:
      | sku      | name           |
      | Ottoman3344 | Ottoman        |
    And "Ottoman1" has existing reviews
    When I turn reviews off for "Ottoman1" product
    Then no review should be displayed for "Ottoman1"

First time the test fails, and upon running it again it complains about "sql-duplicate-key-warning".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants