Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The allure report mixes steps, it no longer attaches the steps to GIVEN, WHEN, THAN #4932

zbachir started this conversation in Show and tell
Discussion options

I use codeceptjs 3.7.2 with playwright 1.28.1 (bdd) with allure-codeceptjs: 3.2.0, this is part of my codecept.conf.js :
....
plugins: {
screenshotOnFail: {
enabled: true
},
allure: {
enabled: true,
require: 'allure-codeceptjs',
resultsDir: env.reportOutput
},
....

The final allure report mixes steps :

  • it no longer attaches the steps to GIVEN, WHEN, THAN,
  • Or, attach all steps the one GIVEN or WHEN or THAN
  • Or, attach some steps one GIVEN or WHEN or THAN and other steps to other one ... etc

example here the scenario:
@FEAT-01-002
Scenario: Authenticated user sets the quantity and add a product to the cart
Given I am logged in as a customer
And My cart is empty
When I add 3 instances of a product1 to my cart
Then My cart contains 3 instances of product1
And I should be able to empty my cart

the phrase "And My cart is empty" contains many steps, but on the report, no step is attached.

please rename this file with extention html before open it:
index.txt

please take a look the the generated report here (see attached file)

You must be logged in to vote

Replies: 3 comments

Comment options

I modify my step like this, but same problem:

const allure = require("allure-js-commons");

Given('I am logged in as a customer', async function() {
await allure.step("Login as a customer", async () => {
await commonPage.loginAsUser(env.ENV, env.user, env.pwd);
global.env.userType = 'customer';
global.values.isConnected = true;
// Empty cart
await utils._emptyMyCart();
I.refreshPage();
})
})

You must be logged in to vote
0 replies
Comment options

When I put an assert in end of the GIVEN it resolve the problem !

like:

Given('I am logged in as a customer', async function() {
await commonPage.loginAsUser(env.ENV, env.user, env.pwd);
global.env.userType = 'customer';
global.values.isConnected = true;
// Empty cart
await utils._emptyMyCart();
I.refreshPage();
I.waitForVisible("//button[contains(., 'My Account')]", 35)
assert.ok(await I.grabNumberOfVisibleElements("//button[contains(., 'My Account')]") > 0)
})

You must be logged in to vote
0 replies
Comment options

do not use I.say with this workaround.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #4931 on March 24, 2025 06:55.

AltStyle によって変換されたページ (->オリジナル) /