Giter Site home page Giter Site logo

Comments (5)

kevinquillen avatar kevinquillen commented on May 28, 2024

Actually.. when I remove the behat.yml, I get a different error about it not able to find the step definitions. Placing it back, I get the 'getSession' error. This seems to be a common error with Mink, but I can't see where I have gone wrong. 'features' folder is in the Drupal docroot, as is behat.yml, and vendor/ folder with composer packages.

from drupalextension.

kevinquillen avatar kevinquillen commented on May 28, 2024

Update on this... when I fall back to the 1.0 version following my own setup guide, it works fine:

http://kevinquillen.com/bdd/2014/06/06/behat-drupal/

Following the given documentation for 3.0, I get the 'getSession' error.

from drupalextension.

eliza411 avatar eliza411 commented on May 28, 2024

Which page of documentation were you following? As far as I can see the README, standalone and site-wide docs all have the proper indentation in the behat.yml file, but your example has an indentation error.

default:
   suites:
     default:
       contexts:
         - FeatureContext
         - Drupal\DrupalExtension\Context\RawDrupalContext
         - Drupal\DrupalExtension\Context\DrupalContext
         - Drupal\DrupalExtension\Context\MinkContext
       extensions:
           Behat\MinkExtension:
             goutte: ~
             javascript_session: selenium2
             selenium2:
               wd_host: http://local.d7sandbox.com:8643/wd/hub
             base_url: http://local.d7sandbox.com
           Drupal\DrupalExtension:
             blackbox: ~
             api_driver: 'drupal'
             drupal:
               drupal_root: '/var/www/site/docroot'

The extensions stanza should line up with the first indentation level (suites:) rather than the third (contexts:)

Try the following:

default:
   suites:
     default:
       contexts:
         - FeatureContext
         - Drupal\DrupalExtension\Context\RawDrupalContext
         - Drupal\DrupalExtension\Context\DrupalContext
         - Drupal\DrupalExtension\Context\MinkContext
   extensions:
       Behat\MinkExtension:
         goutte: ~
         javascript_session: selenium2
         selenium2:
           wd_host: http://local.d7sandbox.com:8643/wd/hub
         base_url: http://local.d7sandbox.com
       Drupal\DrupalExtension:
         blackbox: ~
         api_driver: 'drupal'
         drupal:
           drupal_root: '/var/www/site/docroot'

Indented like the docs examples, everything runs fine. Indented as it is in the first example, I get the same error you do.

I'll be happy to update the errant docs out there if you can point me toward them.

from drupalextension.

kevinquillen avatar kevinquillen commented on May 28, 2024

D'OH!

I just installed PHPStorm 8 and it looks like I have some space configuration to do. Indentation didn't even occur to me! It is working now. Thanks!

from drupalextension.

kevinquillen avatar kevinquillen commented on May 28, 2024

As for the docs, I may have copied and pasted the examples in while trying to get it going and not noticed the spacing being too indented.

from drupalextension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.