Skip to content
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

Bug: Duplicated step checking is missing #74

Closed
jzaratei opened this issue Nov 23, 2023 · 3 comments
Closed

Bug: Duplicated step checking is missing #74

jzaratei opened this issue Nov 23, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@jzaratei
Copy link

jzaratei commented Nov 23, 2023

Given

export default defineConfig({
  ...
  project : {
      name: "login-chrome",
      testDir: defineBddConfig({
        outputDir: ".features-gen/login",
        importTestFrom: "page-objects/basePage.ts",
        paths: ["./features/login.feature"],
        require: ["page-objects/*.ts"],
        featuresRoot: "./features",
        verbose: true,
      }),
    },
    {
      name: "Regresion - Chrome",
      testDir: defineBddConfig({
        outputDir: ".features-gen/regression",
        importTestFrom: "page-objects/basePage.ts",
        paths: ["./features/todo.feature"],
        require: ["page-objects/*.ts"],
        featuresRoot: "./features",
        verbose: true,
      }),
      dependencies: ["login-chrome"],
   }

`
  @Then('page screenshot matches previous one')
  async matchScreenshot() {
    await expect(this.page).toHaveScreenshot();
  }

  @Then('page screenshot matches previous one')
  async matchScreenshotv2() {
    await expect(this.page).toHaveScreenshot();
  }`

When
I execute npx bddgen

Then
no error msg is displayed and the test cases are not generated

Expected behavior
Error: Several step definitions found for text: page screenshot matches previous one (features\todopage.feature)

Isolated demo
(vitalets/playwright-bdd-example#7)

Environment

@jzaratei jzaratei added the bug Something isn't working label Nov 23, 2023
@jzaratei jzaratei changed the title Bug: Step duplicated check is missing Bug: Duplicated step checking is missing Nov 23, 2023
@vitalets
Copy link
Owner

@jzaratei thanks for reporting! Will fix in the nearest release.

@vitalets
Copy link
Owner

Released in v5.6.0.
Please re-check on your side and report if there are any issues.

@jzaratei
Copy link
Author

Released in v5.6.0. Please re-check on your side and report if there are any issues.

All is working fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants