Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Cucumber Support Broken #2634

Closed
ayush opened this issue Oct 26, 2015 · 10 comments
Closed

Cucumber Support Broken #2634

ayush opened this issue Oct 26, 2015 · 10 comments

Comments

@ayush
Copy link

ayush commented Oct 26, 2015

lib/frameworks/cucumber.js references getFormatter() which seems to have been removed from cucumber.js and this results in protractor not working with latest (0.8.0+) cucumber.js

@NickTomlin
Copy link
Contributor

I believe this is PR'd in #2630. As a cucumber user, your feedback would be very valuable on that PR.

@bmsoko
Copy link

bmsoko commented Oct 26, 2015

@NickTomlin @ayush I've replaced the PR'd code into my local cucumber.js library, and seems that it's not working, I can see this:
pr2630

I'm still getting:

$ protractor conf.js
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://192.168.0.104:55634/wd/hub
[launcher] Error: TypeError: undefined is not a function
    at /usr/local/lib/node_modules/protractor/lib/frameworks/cucumber.js:150:36
    at Function.promise (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:650:9)
    at /usr/local/lib/node_modules/protractor/lib/frameworks/cucumber.js:147:14
    at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:759:13)
    at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:525:49
    at flush (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:355:11)
[launcher] Process exited with error code 100

I've replaced the whole file! do I need to do something else?

Thanks!!

@darrinholst
Copy link
Contributor

Can you try pulling in my revision locally instead of patching the file manually. From the stacktrace it appears that it's still picking up the old version of protractor.

  "protractor": "darrinholst/protractor#c437d756",

@sjelin sjelin closed this as completed in 451aa88 Oct 26, 2015
@HSDen
Copy link

HSDen commented Nov 12, 2015

Hi,

I am also facing the same issue, below are the details
protractor ~2.5.1
cucumber ~ 0.9

exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',

framework: 'cucumber',
specs: [
    '/features/*.feature'
],

cucumberOpts: {

    require: '/features/step_definitions/*.js',
    format: 'pretty'
},
capabilities: {
    'browserName': 'chrome'
},

jasmineNodeOpts: {
    defaultTimeoutInterval: 30000
}

};

Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
[launcher] Error: TypeError: undefined is not a function
at /usr/local/lib/node_modules/protractor/lib/frameworks/cucumber.js:150:36
at Function.promise (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:650:9)
at /usr/local/lib/node_modules/protractor/lib/frameworks/cucumber.js:147:14
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:797:54)

Can some help be provided please

@darrinholst
Copy link
Contributor

Yep, protractor support broke with this commit.

Also, there hasn't been a protractor release since the support was added for cucumber 0.8.0. So with protractor ~2.5.1 you'll need to use cucumber ~0.7.0.

@sjelin
Copy link
Contributor

sjelin commented Nov 12, 2015

We'll be releasing a separate npm module for cucumber support in 8.x soon, and you guys will be able to use that.

@ocrosby
Copy link

ocrosby commented Feb 24, 2016

Can someone direct me to some information about how to get protractor working with cucumber since the removal of cucumber support in protractor? It would be greatly appreciated.

@ocrosby
Copy link

ocrosby commented Feb 24, 2016

Thank you, that's exactly what I was looking for. :D

@wlsf82
Copy link

wlsf82 commented Feb 24, 2016

@HSDen
Copy link

HSDen commented May 17, 2016

I was able to fix the issue using a downgraded version of cucumber

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants