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

[v.3.0.0-beta.7][allure-jest][allure-js-commons] meta information is not passed to tests from the beforeEach fixture #1075

Closed
lifanov-rza opened this issue Jul 26, 2024 · 5 comments
Labels
theme:jest Jest related issue
Milestone

Comments

@lifanov-rza
Copy link

lifanov-rza commented Jul 26, 2024

Describe the bug
All tests for related functionality are divided into directories, so in order not to duplicate code inside tests, we put all meta information (feature, link to documentation, etc.) in the beforeEach block. In the version on the master branch, this feature is present, however, in the new version, this functionality does not work, but we do not receive errors during code execution.

To Reproduce
Steps to reproduce the behavior:

  1. create several tests using JEST in 1 file
  2. add beforeEach block with adding meta information steps
  3. run test
  4. run allure serve
  5. check meta info in allure

Expected behavior
Every tests have meta info

@baev
Copy link
Member

baev commented Jul 26, 2024

@lifanov-rza please specify the test framework you're using.

@lifanov-rza lifanov-rza changed the title [v.3.0.0-beta.7][allure-js-commons] meta information is not passed to tests from the beforeEach fixture [v.3.0.0-beta.7][allure-jest][allure-js-commons] meta information is not passed to tests from the beforeEach fixture Jul 29, 2024
@lifanov-rza
Copy link
Author

@lifanov-rza please specify the test framework you're using.

done

@baev baev added the theme:jest Jest related issue label Jul 29, 2024
@lifanov-rza
Copy link
Author

lifanov-rza commented Jul 30, 2024

@baev Could you please provide me the information when are you going to fix this bug? It is very important for me, since the MR has already been prepared for moving to this reporter and only the presence of this problem blocks the release

@baev baev added this to the 3.0 milestone Aug 5, 2024
@mkozakevich
Copy link

mkozakevich commented Aug 14, 2024

Same thing

I've tried some beta versions and found that problem is in the allure-jest v3.0.0-beta.6 and later

Everything works fine in v3.0.0-beta.5

How to reproduce:

Add this code to any test

import {tag} from 'allure-js-commons';

beforeEach(async () => {
    await tag('some-tag');
});

Report will consist tag if you use v3.0.0-beta.5

{
    ...
    "labels": [
        {"name": "tag", "value": "some-tag"}
    ]
}

But report will consist default labels only if you use v3.0.0-beta.6

@baev
Copy link
Member

baev commented Aug 14, 2024

This issue is planned to be fixed for the final 3.0.0 release.

WIP PR #1041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme:jest Jest related issue
Projects
None yet
Development

No branches or pull requests

3 participants