allure-framework / allure-js

Allure integrations for JavaScript test frameworks
https://allurereport.org/
Apache License 2.0
230 stars 124 forks source link

one expression fails in one step but the cucumber scenario is marked pass #574

Closed bodycombathuang closed 4 months ago

bodycombathuang commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

Given('given', async function (this: ICustomWorld) {
   await this.step("step1", async () => {
     expression1
  });
  await this.step("open location", async () => {
    expression 2
  });

 expression 3
});

expression 2 throws exception, and in allure report, I can see the second step fails, but the scenario is marked PASS, it is so strange if I change the code to

Given('given', async function (this: ICustomWorld) {

     expression1

    expression 2

 expression 3
});

the scenario is marked FAIL

I am using typescript+@cucumber/cucumber and allure-cucumberjs

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

baev commented 4 months ago

the issue is fixed in allure-cucumberjs@3.0.0-beta