Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoOpen=true not working on Windows. #144

Closed
Rup1 opened this issue Mar 22, 2017 · 3 comments
Closed

autoOpen=true not working on Windows. #144

Rup1 opened this issue Mar 22, 2017 · 3 comments
Labels

Comments

@Rup1
Copy link

Rup1 commented Mar 22, 2017

Hi I have the following in my package.json:

"scripts": {
    "test": "mocha test --reporter mochawesome --reporter-options autoOpen=true"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "mocha": "^3.2.0",
    "mochawesome": "^2.0.4"
  }

When I run 'npm test' I get:

PS C:\Users\ConquerJS\Desktop\dev\webdriver-tutorial\webdrivertut> npm test

> webdrivertut@1.0.0 test C:\Users\ConquerJS\Desktop\dev\webdriver-tutorial\webdrivertut
> mocha test --reporter mochawesome --reporter-options autoOpen=true



(node:10312) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
  library app scenarios
    √ Changes Button opacity upon email being filled out (4015ms)
    √ submitting email shows an alert (3143ms)
    √ Shows a navbar (2292ms)

  3 passing (9s)

[mochawesome] Report JSON saved to C:\Users\ConquerJS\Desktop\dev\webdriver-tutorial\webdrivertut\mochawesome-reports\mochawesome.json

[mochawesome] Report HTML saved to C:\Users\ConquerJS\Desktop\dev\webdriver-tutorial\webdrivertut\mochawesome-reports\mochawesome.html

PS C:\Users\ConquerJS\Desktop\dev\webdriver-tutorial\webdrivertut>

But the browser doesn't open.

Initally I had windows set to node version 7.7.3, but now I set both Windows and mac to 6.7.0 and mac works but not windows.

All code is in my repo here https://github.com/Rup1/webdrivertut

@adamgruber
Copy link
Owner

Hey, thanks for the sample repo. From what I can tell, the call to open the file is being made but then the process exits. On Windows this seems to cause the child process to die before it can finish opening the file. I'll have to rework things a bit to ensure that the open completes before we tell mocha we're done.

@adamgruber
Copy link
Owner

Fixed in mochawesome-report-generator@1.1.2. Reinstall mochawesome to get the latest version.

@Rup1
Copy link
Author

Rup1 commented Mar 24, 2017

BOOM. It works! Thank you for the quick fix and developing this amazing reporter.

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

No branches or pull requests

2 participants