A.Hidri
A.Hidri

Reputation: 41

Using cucumber-mink with meteor-velocity

I have velocity installed and running on a meteor project.

I came across cucumber-mink, and I am struggling to get my scenarios to work with steps defined in cucumber-mink.

I added cucumber-mink to to cucumber dependencies

{
  "name": "cucumber-tests",
  "version": "1.0.0",
  "description": "Dependencies for our Cucumber automation layer",
  "private": true,
  "dependencies": {
    "underscore": "^1.8.3",
    "cucumber-mink": "^1.0.2"
  }
}

But I think I am missing something here. How do I get my scenarios to use steps defined in cucumber-mink?

Upvotes: 0

Views: 188

Answers (1)

Robert Wahler
Robert Wahler

Reputation: 12902

I found this to work using the ChromeDriver.

Create 'features/support/mink.js'

// This support file is loaded via --require on the cucumber command line
var Mink = require('cucumber-mink');

// http://webdriver.io/guide/getstarted/configuration.html
// https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities
var parameters = {
  driver: {
    desiredCapabilities: {
      browserName: 'chrome'
    },
    logLevel: 'silent',
    port: 9515
  }
};

module.exports = function () {
  Mink.init(this, parameters);
};

And require 'mink.js' and your custom steps on the command line.

./node_modules/.bin/cucumber-js --require ./features/support/mink.js --require ./features/step_definitions/

Upvotes: 0

Related Questions