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: Special tag @retries:0 does nothing #187

Closed
niss36 opened this issue Jul 24, 2024 · 0 comments · Fixed by #188
Closed

Bug: Special tag @retries:0 does nothing #187

niss36 opened this issue Jul 24, 2024 · 0 comments · Fixed by #188
Labels
bug Something isn't working

Comments

@niss36
Copy link
Contributor

niss36 commented Jul 24, 2024

Given
Starting with the example repo, adding @retries:0 on a Scenario

Feature: Playwright Home Page

    @retries:0
    Scenario: Check title
        Given I am on Playwright home page
        When I click link "Get started"
        Then I see in title "Installation"

When
I run bddgen

Then
If I inspect the generated .spec.js file, I don't see any configuration of retries for that scenario:

test.describe("Playwright Home Page", () => {
  test(
    "Check title",
    { tag: ["@retries:0"] },
    async ({ Given, page, When, Then }) => {
      await Given("I am on Playwright home page", null, { page });
      await When('I click link "Get started"', null, { page });
      await Then('I see in title "Installation"', null, { page });
    }
  );
});

But I expect
An anonymous describe block configured with 0 retries, e.g.:

test.describe('Playwright Home Page', () => {

  test.describe(() => {
    test.describe.configure({"retries":0});

    test('Check title', { tag: ['@retries:0'] }, async ({ Given, page, When, Then }) => {
      await Given('I am on Playwright home page', null, { page });
      await When('I click link "Get started"', null, { page });
      await Then('I see in title "Installation"', null, { page });
    });

  });

});

Isolated demo
https://github.com/niss36/playwright-bdd-example

Environment

platform: darwin
node: v18.17.0
playwright-bdd: v7.0.0
@playwright/test: v1.44.1

I think I've tracked the root cause to a bad conditional and will open a PR for it :)

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

Successfully merging a pull request may close this issue.

1 participant