WebdriverIO project generator for Serenity/JS#11368
WebdriverIO project generator for Serenity/JS#11368christian-bromann merged 14 commits intowebdriverio:mainfrom
Conversation
…ions could be added
christian-bromann
left a comment
There was a problem hiding this comment.
This PR seems to only contains improvements for unit tests and some wording. No signs of Serenity in here. If this is intentional, let's go ahead and merge this as it a good patch itself.
LGTM 👍
|
@christian-bromann - I'm adding Serenity now :) |
|
@christian-bromann - I added project generators for Serenity/JS with Cucumber, Jasmine, and Mocha. Please let me know if you're happy with the overall structure and integration points. I've tested this extensively manually by generating a project with each of the 3 runners and each runner using TS, CJS, ESM, or Babel, but I need to think about automated tests I could write to ensure that the EJS template rendering works as expected. Maybe snapshot tests could do the trick here, as there are quite a few template files involved. |
christian-bromann
left a comment
There was a problem hiding this comment.
One comment, otherwise LGTM
What do you think @erwinheitzman @tamil777selvan ?
tamil777selvan
left a comment
There was a problem hiding this comment.
I have a minor suggestion. Could we have a single template instead of both js.ejs and ts.ejs as like we currently have?
That's a good idea; I'll need to introduce some helpers to avoid having to repeat |
|
@christian-bromann and @tamil777selvan - thanks for your feedback. I merged WebdriverIO and Serenity/JS configuration templates. I've also removed separate templates for CJS/ESM and instead generate TS, CJS and ESM from TypeScript templates. Serenity/JS code sample templates are reasonably involved as they contain classes, functions, interfaces, parameters, return types, and so on. To avoid polluting WDIO EJS templates with a bazillion The best example of using the helpers can be seen at https://github.com/webdriverio/webdriverio/pull/11368/files#diff-d2b3a22b9c707586c3011b43acc439b12e3c952a0bf5f70f58cf257558406908 You'll also find unit tests demonstrating the behaviour of I think I've arrived at quite an elegant solution that could be used to simplify other WDIO templates too if needed. Looking forward to hearing your thoughts! |
Proposed changes
Per my discussion with @christian-bromann, I'd like to extend the WebdriverIO project wizard to generate Serenity/JS projects, too.
Types of changes
Checklist
Further comments
Reviewers: @webdriverio/project-committers