Skip to content

Instantly share code, notes, and snippets.

@havvg
Created September 9, 2011 14:44
Show Gist options
  • Save havvg/1206414 to your computer and use it in GitHub Desktop.
Save havvg/1206414 to your computer and use it in GitHub Desktop.
Behavior Driven Development in Symfony2 with Behat, Mink and Zombie.js
@leftdevel
Copy link

Hi guys.
Im having the same Cordoval issue for the zombie driver:

text\FeatureContext::assertElementContainsText()
    And I should not see "Calvin Klein Black, 5"                                # Acme\DemoBundle\Features\Context\FeatureContext::assertPageNotContainsText()
      The text "Calvin Klein Black, 5" appears in the text of this page, but it should not.

5 scenarios (4 passed, 1 failed)

I'm using symfony2 beta3 with this config for composer:

        "behat/behat":  "2.4.*@stable",
        "behat/mink":   "1.4.*@stable",

        "behat/symfony2-extension":      "*",
        "behat/mink-extension":          "*",
        "behat/mink-browserkit-driver":  "*",
        "behat/mink-selenium2-driver":   "*",
        "behat/mink-zombie-driver":   "*"

I've tried to use default_session:symfony2, and use the @mink:zombie annotation, also just leaving the default_session:zombie.

Any advice? Thanks.

@havvg
Copy link
Author

havvg commented Jul 19, 2012

Did you try the reload step?

I'm not exactly sure, but I believe the issue is somewhere within Zombie.js.
There are even more issues with Zombie.js. That's why we switched to Sahi. It's not as fast, but by our experience with both variants way more reliable

@cordoval
Copy link

@cordoval is a like minded individual

@leftdevel
Copy link

Hi again.
As @havvg suggested, putting a "And I reload the page" seems to work, the odd thing is that this needs to be put after each "When I move backward one page".

Seems a bug to me. Should I rely on this trick or should I move to another driver? Saphi?

Many thanks.

@cordoval
Copy link

That's why we switched to Sahi.

@leftdevel
Copy link

Oh. Thanks. I was writing at the same time as you guys, now I notice your comments.
Thanks. I think I will make the switch to Sahi; I think it is not safe to rely a serious project with this kind of bug + workarounds :D

Many thanks.

@b00gizm
Copy link

b00gizm commented Jul 19, 2012

The problem is that the development of Zombie.js went very fast in the last few month with a lot of refactoring and new internal libraries. It's pretty hard to keep up with all the compatibility issues, especially when you can only spent a pretty small amount on your time on your open source projects :-/

In my experience, everything below v0.13.0 works pretty well with the current version of the ZombieDriver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment