igniteram / protractor-cucumber-typescript

e2e kickstarter test framework which consists of protractor, cucumber frameworks using typescript lang!
MIT License
196 stars 170 forks source link

scenario.attach is not a function #14

Closed dennyx closed 7 years ago

dennyx commented 7 years ago

Thanks for the sharing this great project; when i tried to start the test, get complains as below: image

may u kindly help on it, thanks~

igniteram commented 7 years ago

Please share your config.js and package.json files, its always good to share these files as it would help to debug such issues !

dennyx commented 7 years ago

hmm.. have no update for the whole project yet; Just download the project, and run below commands as Readme:

  1. npm install
  2. npm run webdriver-update
  3. npm run webdriver-start
  4. npm run tsc
  5. npm test

also attach the files: config.txt package.txt

change file extension to txt as .ts/.json blocked in comments; Thanks for the kindly feedback~

igniteram commented 7 years ago

ohk, so you haven't changed anything. It's strange that you are facing an issue, are you sure you got no compilation errors when you ran npm run tsc?

dennyx commented 7 years ago

no compile errors get when run command npm run tsc would it due to typescript version ? I'm using typescript Version 2.1.4

igniteram commented 7 years ago

I tried just now cloning this repo afresh and everything seems to work fine!

testrun

I could only suggest you should use the following version of dependencies -

Except node module & chrome browser all the above modules come with the project itself no need to install separately.

Try upgrading your node and chrome browser and run the scripts, it should certainly work!

dennyx commented 7 years ago

may u kindly try for the failed issues ? something like change www.google.com to www.googlenoreach.com, as it would trigger the snapshot capture method defined in hook.ts; I encountered exception when trying to take snapshot as case failed; thanks~

igniteram commented 7 years ago

ok I got the issue, its failing in failed scenarios, I will mark this as a bug thanks for pointing out. Soon would be providing a fix for it!

igniteram commented 7 years ago

Provided a fix for this issue here - https://github.com/igniteram/protractor-cucumber-typescript/pull/15 Please pull in the new changes and try it out.

dennyx commented 7 years ago

thanks for the great effort, everything works well now~