Giter VIP home page Giter VIP logo

Comments (6)

NikkTod avatar NikkTod commented on May 18, 2024

@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.

jzaratei avatar jzaratei commented on May 18, 2024

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.

vitalets avatar vitalets commented on May 18, 2024

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.

vitalets avatar vitalets commented on May 18, 2024

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.

konkakaka avatar konkakaka commented on May 18, 2024

@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.

vitalets avatar vitalets commented on May 18, 2024

@konkakaka Cucumber (Gherkin) Full Support works for me. Could you share more details, especially .vscode/settings.json?

from playwright-bdd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.