allure-js
allure-js copied to clipboard
Bug: attachments in steps. Creates redundant extra sub-step and meta step. `allure-playwright 2.7.0`
await allure.attachment() from allure-playwright 2.7.0 version produces an extra step with the name of the attachment and meta step
To Reproduce Steps to reproduce the behavior:
- Code:
await allure.step('Created step', async () => {
await allure.attachment(
'Some data',
JSON.stringify({ data: { name: 'Bob' } }),
'application/json',
)
})
- Creates the step:
Expected behavior Don't create this extra sub-step with name of the attachment and don't show this meta step it in the report. Should create attachment only attached to the step 'Created step', not to the sub-step
There are two issues in there:
- Since
2.7.0detailandsuiteTitleare now set to true by default. Because of that systemattachsteps are now reported. I completely disabled attach steps reporting in https://github.com/allure-framework/allure-js/pull/773 as we already display attachments in the report. - When using
allure.attachmentmethod, an additional wrapping step is created for each attachment. We plan to release visual improvement in the next release of the Allure Report. See the change here: https://github.com/allure-framework/allure2/pull/2107
For more details on Playwright changes, please refer https://github.com/orgs/allure-framework/discussions/2103