Closed bruderol closed 8 years ago
I am working on that. Great work by @xeronimus ! :+1: I will extend and improve it in some points to be even more useful for some project.
@xeronimus: I think maybe that we should reconsider to make the DSLs (or at least the extended and the fluent one) still to be part of ScenariooJS, because it is very easy to extend such a DSL with application specific stuff, by simply overwritting the usecase and scenario function properly. We could even add an example for this.
@xeronimus @adiherzog I am currently working on the scenarioo-js library because i need it in a project.
I think we should go with the forthcoming 2.2 release to also release a 2.2 javascript library update. @xeronimus allready did some good work for this next version.
Some thoughts on that:
Hey @bruderol,
nice work! thanks!
I'm looking forward to the improved example. I strongly recommend against making it the default api. with the new scenarioo-js 2, we deliberately removed any "wrapping" around pure jasmine functions. This in order to separate test structure / test setup from (scenarioo) reporting...
@dola would be great if you could review what i am doing here on the feature branch for this issue and give me some feedback and also start to think about how we could or should design this for the future (Format 3.0). Thank you.
@xeronimus of course, it is great how it is decoupled now and that it is possible now to use it with just standard jasmine2 describe and it functions. And I not plan to change this back again. This was an important thing that you improved and I of course want to keep that, as we allready decided once together. But ...
On the other hand I think, that we should include both options in the library:
So why not adding the fluent DSL directly to the library? And maybe also the simple DSL just for backward compatibility? What you think?
By the way: You can see what I was working on the last days on the feature branch for this issue.
I consider this as done.
The fluent DSL (former called "chained DSL") by @xeronimus is great to be used as a starting point for a e2e-test DSL in real life projects. I will improve it in some points to become even more useful.
Points to improve:
[x] new name for this DSL: I think that "Fluent DSL" is the better name than "Chained DSL"
[x] Improve folder/file structure of examples (separate spec and DSL examples in two folder and reference accordingly in README.md, for each DSL a separate example spec file)
[x] improve documentation of DSLs and Examples (mainly add more comments and improve readmes)
[x] introduce a "describe" and "it" function (instead of the "has"), which is more consistent with jasmine
[x] also support fdescribe, xdescribe, fit, xit
[x] add a pending to more nicely put specs to pending (without xdescribe, xit and a comment message that shows up in the log, and also include a workaround for protractor issue https://github.com/angular/protractor/issues/2454)
[x] also extend DSL to validate labels against labels that are defined for your application:
[x] improve example protractor configuration:
[x] also provide fluent DSL for steps and document it