Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Zombie is throwing syntax error #954

Open
iamstoick opened this issue Oct 18, 2015 · 0 comments
Open

Zombie is throwing syntax error #954

iamstoick opened this issue Oct 18, 2015 · 0 comments

Comments

@iamstoick
Copy link

Behat newbie here. Started Behat 2 days ago and I am working on using Zombie which I am having trouble to make it work.

gerald@von-viel:~/Repo/drupalproject/tests$ bin/behat --stop-on-failure features/home.feature 
Feature: Homepage
  In order to know the website is running
  As a website user
  I need to be able to view the site title and login

  [RuntimeException]                                                                                                                                    
  Exception has been thrown in "beforeScenario" hook, defined in FeatureContext::beforeScenario()                                                       

  Server process has been terminated: (1) [/home/gerald/Repo/drupalproject/tests/node_modules/zombie/node_modules/jsdom/lib/jsdom/level1/core.js:418  
    set nodeName() { throw new core.DOMException();},                                                                                                   
                 ^                                                                                                                                      
  SyntaxError: Unexpected token )                                                                                                                       
      at exports.runInThisContext (vm.js:73:16)                                                                                                         
      at Module._compile (module.js:443:25)                                                                                                             
      at Object.Module._extensions..js (module.js:478:10)                                                                                               
      at Module.load (module.js:355:32)                                                                                                                 
      at Function.Module._load (module.js:310:12)                                                                                                       
      at Module.require (module.js:365:17)                                                                                                              
      at require (module.js:384:17)                                                                                                                     
      at Object.<anonymous> (/home/gerald/Repo/drupalproject/tests/node_modules/zombie/node_modules/jsdom/lib/jsdom/level2/core.js:1:94)              
      at Module._compile (module.js:460:26)                                                                                                             
      at Object.Module._extensions..js (module.js:478:10)                                                                                               
  ]                                                                                                                                                     

behat [--init] [-f|--format="..."] [--out="..."] [--lang="..."] [--[no-]ansi] [--[no-]time] [--[no-]paths] [--[no-]snippets] [--[no-]snippets-paths] [--[no-]multiline] [--[no-]expand] [--story-syntax] [-d|--definitions="..."] [--name="..."] [--tags="..."] [--cache="..."] [--strict] [--dry-run] [--stop-on-failure] [--rerun="..."] [--append-snippets] [--append-to="..."] [features]

Here is my feature:

Feature: Homepage
  In order to know the website is running
  As a website user
  I need to be able to view the site title and login

  Scenario: Viewing the site title
    Given I am on the homepage
    Then I should see "Welcome"

  @api @mink:zombie
  Scenario: See "Add Content"
    Given I am logged in as a user with the "administrator" role
      And I am on the homepage
    Then I should see "Add content"
    When I click "Add content"
    # And I wait for "9" seconds
    Then I should see "Use basic pages for your static content"

Some details about my environment:

gerald@von-viel:~/Repo/drupalproject/tests$ node --version
v0.12.7

gerald@von-viel:~/Repo/drupalproject/tests$ npm list zombie
/home/gerald/Repo/drupalproject/tests
└── [email protected] 
Behat 2.5.0
mink-zombie-driver (v1.1.0)

behat.yml

default:
  paths:
    features: 'features'
  extensions:
    Behat\MinkExtension\Extension:
      goutte: ~
      selenium2: ~
      zombie: ~
      base_url: http://local.drupalproject.com
      default_session: 'zombie'
      javascript_session: zombie
      zombie:
        node_modules_path: /home/gerald/Repo/drupalproject/tests/node_modules/
    Drupal\DrupalExtension\Extension:
      blackbox: ~
      api_driver: drupal
      drush:
        alias: drupal.local
      drupal:
        drupal_root: '../www'
      subcontexts:
        paths:
          - '../www/sites/all/modules'
      selectors:
        error_message_selector: .messages.error
        success_message_selector: .messages.status
      text:
        username_field: Email
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant