-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Use decorators to define steps in Page Object Models #35
Comments
@vitalets This would definitely save us some code typing and linking between feature -> steps -> pages. |
That could be interesting, but what if I want to make use of multiples pages objects in a single step, for example:
This implementation could be still be possible? |
Yes, that will be possible as regular Btw, if "delete project" is some link / button on |
Released in v4.0.0. Docs. I would appreciate if try it and share your feedback :) |
@vitalets which extension on Visual Studio Code on Mac that would suggest the steps while typing existing defined step on feature file? I tried |
@konkakaka |
Imagine I use
TodoPage
fixture (page object model) from Playwright docs:Typical BDD step definitions for
todoPage
will be:For me such step definitions look like a boilerplate code. It would be more convenient to just mark
todoPage
methods with step text - the same way as it's done in Cucumber Java. Having new JS decorators syntax it should be possible:In that case there is no need for additional
steps.ts
file. We just define fixture and write scenarios.Possible downside is that VSCode BDD extensions maynot recognize such step definitions (to be checked).
Would appreciate your ideas on that.
The text was updated successfully, but these errors were encountered: