Comments (4)
Yep! This is definitely on the roadmap but I'd love a PR on this if you have time!
I was thinking about the ability to pass in a filename and have that be require
d by protractor flake. It would just have to return an array of files to retest.
from protractor-flake.
Sorry for the delay, I've been quite busy.
Would you prefer :
- Add an option which will give the path to be required assuming the parser value is set to "custom" into the index
- Update the getParser function to try to require the name (which might actually be a path so maybe a bit confusing) if !all[name]
- A mix of both, based on a second optional parameter supported by the getParser method and returning the require if the first one is set to custom ?
Maybe there is a better way to do it.
For the testing part :
- Unit : this one for me would be a bit complex to be test, I can create a custom parser but since the parser used will be fully custom it will be more about "How to create my custom parser" documentation
- IT : No difficulties here, I can just spawn the command and test different use cases (Valid/Invalid custom parser), on my side I'll probably wrote them in typescript with an interface/implementation for transpilation checks
I can do the PR but I need to clarify those points before :)
from protractor-flake.
Sorry for the late reply!
This is an interesting question, let's think about a few options for calling it
# an additional option
protractor-flake --require-parser /path/to/parser.js
# make parser "smart"
protractor-flake --parser/path/to/parser.js
# add an option to require a file
protractor-flake --require /path/to/parser.js --parser 'name-of-custom-parser'
My initial reaction is that it would be worth it to try something fancy like protractor-flake --parser/path/to/parser.js
.
We could take a few approaches:
- Require that parsers include the full extension
.js
/.ts
/.es6
and assume that any parser name that ends with a.
should be required - Require that users specify an absolute path and look for
/
or\
- Attempt to require a parser at the path if one doesn't exist for that name (seems sort of flakey)
As for testing, i'd just create a custom parser fixture and pass that to whatever test you use. That way there's no way to do anything weird with files, it would just be required from the test. We could even use a tmp
directory if we wanted to be sure there wasn't anything project specific that was interfering with this.
Let me know what you think!
from protractor-flake.
Support for custom parsers was released in 2.2.0 9791183
from protractor-flake.
Related Issues (20)
- How to build with ng e2e and run config file via protractor-flake? HOT 7
- The automated release is failing 🚨 HOT 1
- Protractor-flake no show outputs in console HOT 18
- Reruning all the tests not just the failed ones with cucumber. HOT 1
- protractor-flake doesn't run tests if suite is not specified HOT 3
- protractor-flake doesn't run the remaining tests after retrying the failed test HOT 5
- protractor-flake finds the typescript file (not the compiled file) on retry HOT 5
- protractor flake executing all suites mentioned instead of specific suite HOT 2
- Feature Request: Option to mark failing and pending specs as failure to be picked up for rerun in flake
- Same failed spec being marked to run twice with cucumber HOT 3
- Failing Cucumber Scenarios causing entire feature files to re-run HOT 4
- Protractor Flake is not working with cucumber? HOT 2
- Feature Request: Expose attemptNo or allow code to be specified in beforeAttempts/afterAttempts HOT 6
- Easier way to specify path of custom parser HOT 5
- screenshots of retries overwrite the original run HOT 4
- Running serve as part of Flake HOT 4
- retryconfig doesn't work HOT 3
- running node ./protractor-flake-retry.js works putting than command inside npm run test fails HOT 3
- seleniumAddress HOT 2
- how to use protractor arguments with yarn HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protractor-flake.