-
Notifications
You must be signed in to change notification settings - Fork 2.3k
chore(cucumber): allow multiple formatters for cucumber #2630
Conversation
Cucumber added support for multiple formatters in 0.8.0 which changed up the configuration api that protractor is hooking into. This fixes protractor for those changes while also allowing multiple formatters to be specified in the `cucumberOpts`.
[cucumberConf.getFormatter()] : | ||
cucumberConf.getFormatters(); | ||
|
||
addResultListener(formatters[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, protractor just needs 1 of the formatters to hook into in order to figure out which scenarios passed/failed. All of the formatters have the same api so it doesn't matter which one we use.
Hello! I've placed a comment on issue #2634, basically I commented this: I'm still getting:
I've replaced the whole file! do I need to do something else? Do you know any last matching versions I can work with? so that I can downgrade? PLS help! thanks!! |
Whoops, commented on the #2634 instead of here... 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", |
To answer your question about last matching versions...you'll have to pin cucumber at |
Thanks @darrinholst, I've done this:
but I'm getting the same output, do I need to do something? some kind of reset? if not, I will pin to the cucumber version you previously told and see if I can get it to work..
Thanks a lot for your time! |
With the previous config I've shared, I'm getting the same error! please let me know if there's an extra configuration or if you can tell what I'm doing wrong! Thanks again @darrinholst ! |
|
or updating the global instance...however your build process is setup. |
Thanks, but had no luck uninstalling globally protractor nor cucumber... I'll need to dig in how to update the global instance! |
Sorry, didn't see you were just running protractor directly. |
Confirmed that this works with protractor's cucumber tests at least |
Merged in at 451aa88 |
@darrinholst I can see that it was merged, but still cannot get it to work!
My
Can you point me to check whatever am I doing wrong? Thanks! @sjelin can you please share what you've done? so that I can definitely check its only my end? |
can you post the output of |
here's
|
I think you've made it out of the scope of this PR. Looks like you have a non es6 js interpreter getting an arrow function to me.
|
And running
|
@darrinholst Sorry for misleading you, the previous error was due that selenium webdriver was installed incorrectly, I had a internet problem and apparently it was not correctly downloaded, I had uninstalled everything and started from scratch. I started by installing Protractor, Cucumber and Webdriver globally and I can see this error, same as before, when I run the protractor command. $ protractor conf.js
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://192.168.0.104:64737/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 Then I've installed all locally, running [launcher] Process exited with error code 1
/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:126
throw e;
^
Error: No selenium server jar found at the specified location (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/selenium/selenium-server-standalone-2.47.1.jar). Check that the version number is up to date.
at LocalDriverProvider.addDefaultBinaryLocs_ (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/driverProviders/local.js:37:11)
at LocalDriverProvider.setupEnv (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/driverProviders/local.js:71:8)
at Runner.run (/Users/brunosoko/Documents/Dev/Personal/olapic-test2/node_modules/protractor/lib/runner.js:261:31)
at TaskRunner.run (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/taskRunner.js:123:19)
at createNextTaskRunner (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/launcher.js:223:20)
at /Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/launcher.js:246:7
at _fulfilled (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:759:13)
at /Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:573:44 Which I resolved by installing locally webdriver Later, I tried to uninstall globally framework, But the same error happens! I'm not sure what am I doing wrong! if @sjelin got it to work please explain what you did! because I'm still getting the same error! Please help!! |
Can you please move this to either stackoverflow or the google group - https://github.com/angular/protractor#getting-help. I'd be happy to discuss there, but this pull request isn't the place to be debugging. |
Cucumber added support for multiple formatters in 0.8.0 which changed up
the configuration api that protractor is hooking into. This fixes
protractor for those changes while also allowing multiple formatters
to be specified in the
cucumberOpts
.