Skip to content

Retry() does not work properly when we are using Scenario.only #3439

@JakubKasprzyk

Description

@JakubKasprzyk

The .retry() does not work properly if we are using it with Scenario.only. I've simulated the test failure and it is not being executed after failure. In the terminal, the result is highlighted in green with the text "OK 0 passed". Below is a screen from the terminal:

image
You can see that the test should fail because we've filled the field with "435,00" and we are expecting to see "222,00"

In addition, I'm attaching the source code below:

Scenario.only(
  'You can save editing of custom product without any changes',
  async ({ I, posPage, device, adminCalendarNavigationPage }) => {
    const { proSalon: salon, logInToAdmin } = await I.getEnvironment({ I });
    await logInToAdmin(salon.owner);
    I.click(adminCalendarNavigationPage.posNavigation);

    if (device.isMobile) {
      I.click(posPage.mobileCheckoutButton);
    }
    const { customProductName: productName, customProductPrice: productPrice } =
      posPage.createCustomProduct(salon.country);

    if (device.isMobile) {
      I.click(posPage.checkout.tooltip.mobileButton);
    } else {
      I.click(posPage.checkout.tooltip.button);
    }
    I.click(posPage.checkout.tooltip.editItem);
    I.click(posPage.addCustomItemDialog.saveButton);
    const productPrice2 = '222,00'
    I.see(productName, posPage.checkout.itemName);
    I.see(`${productPrice2} €`, posPage.checkout.totalPrice);
  },
).retry(2);

I've also tried with { retries: 2 } - but unfortunately with the same result.
I'm working on CodeceptJS + Playwright.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions