-
Notifications
You must be signed in to change notification settings - Fork 51
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
protractor-flake finds the typescript file (not the compiled file) on retry #107
Comments
The issue here is that the path in the stacktrace (which is what flake uses to choose what to re-run) is a ts one and not a js one:
I'm not sure if this is the default behavior, or something that is happening during transpilation. Can I get you to produce a small example repo? If it's an error with the project we can use that to create an integration test that we can use to build a fix against. One short-term workaround would be to create your own custom parser, and just |
I have a simple repo that exposes the issue if you're still in need of a test case. |
@sjmckinney that would be helpful, please share it if you still have it |
The url of the repo is: https://github.com/sjmckinney/34-protons-protractor-automation There are two identical specs; login.spec.ts and login1.spec.ts. The former contains a failing test version of the test 'should show user page loading message whilst logging in' which will cause that spec to be repeated. Running tsc with the current tsconfig.json should compile the .ts files to a './dist' sub-folder from where they will be run. Change the value of 'parser' to 'standard' in the 'flake' script to demonstrate the issue as reported. I have implemented a custom parser, 'my_parser.js' as a work around. |
thanks for this. I'm currently in a busy season at work and at home so I may not get to look at it for some time. I'd welcome a pull request that bakes this into the standard parser (perhaps detecting ts paths and transforming them?) in the meantime! |
This might be a documentation problem rather than a parser problem. I discovered that protractor-flake was rerunning all of my tests rather than the failed ones, so I tried a small test with one spec deliberately set to fail. Here was the command and the resultant output:
So far so good. But check this out: Continuing,
My read is, it looks like the first run correctly used my compiled
conf.js
to find the paths for the tests it needed to run, but on the subsequent run, it picked up the typescript file instead. Did I miss a flag somewhere in my command, or is this a genuine bug?===============================================
The text was updated successfully, but these errors were encountered: