I've been working hard lately on adding Behat tests to panopoly. I also wanted to add some to my own project - and used the same procedure. But for some reason I am not able to do:

Given I am logged in as a user with the "administrator" role

My test is fairly simple:

https://github.com/vih/vih.dk-deploy/blob/travis/tests/behat/features/ad...

And the test results are here (which resembles my local testing also)

https://travis-ci.org/vih/vih.dk-deploy/builds/15397911

What could I be doing wrong? I've checked the backend, and there is an administrator role when logging into the site. If I add @javascript it seems to login (I can see an Add Content link after trying with the Javascript)

Comments

jhedstrom’s picture

The way the code currently checks for being logged in, is that it looks for a link with the text Log out. When that is missing, the Drupal Extension will fail to detect a succesful login.

jhedstrom’s picture

Status: Active » Postponed (maintainer needs more info)
manumilou’s picture

I had the same problem. Fixed by setting properly the log_out DrupalText in behat.yml.

lsolesen’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.