Comments (6)
@vitalets This would definitely save us some code typing and linking between feature -> steps -> pages.
Hope it is not affecting the VSCode BDD extensions with all the bindings :)
from playwright-bdd.
That could be interesting, but what if I want to make use of multiples pages objects in a single step, for example:
When("I delete an old project", async ({ ProjectsPage, deleteProjectPage }) => {
oldProjectName = await ProjectsPage.getLastProjectName();
await deleteProjectPage.deleteProject(oldProjectName);
});
This implementation could be still be possible?
from playwright-bdd.
That could be interesting, but what if I want to make use of multiples pages objects in a single step, for example:
When("I delete an old project", async ({ ProjectsPage, deleteProjectPage }) => { oldProjectName = await ProjectsPage.getLastProjectName(); await deleteProjectPage.deleteProject(oldProjectName); });
This implementation could be still be possible?
Yes, that will be possible as regular Given / When / Then
functions will be available as well.
Btw, if "delete project" is some link / button on ProjectsPage
- shouldn't it be part of ProjectsPage
?
from playwright-bdd.
Released in v4.0.0. Docs.
I would appreciate if try it and share your feedback :)
Personally I've moved one of my projects to BDD decorators and I found this syntax very concise.
from playwright-bdd.
@vitalets which extension on Visual Studio Code on Mac that would suggest the steps while typing existing defined step on feature file? I tried Cucumber (Gherkin) Full Support
, and others, but it doesn't seem work, thank you!
from playwright-bdd.
@konkakaka Cucumber (Gherkin) Full Support
works for me. Could you share more details, especially .vscode/settings.json?
from playwright-bdd.
Related Issues (20)
- Bug: SyntaxError when generating tests HOT 2
- Steps are not being found (probably something simple I have missed) HOT 2
- Bug: Inheritance Issue when more than one child is issue in the same scenario HOT 4
- Open Playwright trace from HTML report without downloading HOT 5
- Error: Pickle step not found for step: I am login in my app (Since v6.0.1 ) HOT 14
- Question around best practice for Fixtures and BDD World. HOT 7
- May be a bug, unsure. Cant call init on BddWorld HOT 3
- Question: Generating cucumber reports with hooks HOT 9
- Getting Typescript error on Cucumber Reporter HOT 2
- Question: How do you organize steps in multiple TypeScript files (Playwright-style)? HOT 2
- Bug: Unknown file extension ".ts" for playwright.config.ts HOT 2
- Generated files contain different paths depending on whether `npx bddgen` is executed in Windows or Mac/Unix HOT 8
- Question: In playwright report, the scenario is displayed twice HOT 2
- Can someone give an example of using Tags to set Locale via Fixtures? HOT 3
- Bug: Error: Requiring @playwright/test second time HOT 16
- Bug: Screenshots generated for visual testing are not correct , getting incomplete screenshots HOT 1
- Bug: Not able to execute tests with latest version of playwright HOT 7
- Question:Do steps have to be Async? HOT 2
- Feature: support new Playwright tags HOT 2
- Question: Why route not used when using routeFromHar with update: false ? HOT 1
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 playwright-bdd.