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

Fail in before hook in structured test #95

Closed
Paprikh7 opened this issue Dec 21, 2023 · 5 comments · Fixed by #151
Closed

Fail in before hook in structured test #95

Paprikh7 opened this issue Dec 21, 2023 · 5 comments · Fixed by #151
Labels
bug Something isn't working medium severity of issue

Comments

@Paprikh7
Copy link

Paprikh7 commented Dec 21, 2023

@hi,
I try to write more organized tests. However, I encountered a problem when the reporter does not log the setup when it falls in before. Here is an example of code that I am able to replicate this on.

describe("test fail in before", function() {
    describe('test fail 2 before', function() {
        before(function() {
            cy.visit('/')
            cy.get('notexistent').click()
        })
        it("Login as user",function () {
            cy.visit('/')
        });
        it("Login as admin",function () {
            cy.visit('/')
        });
    })
})
Screenshot 2023-12-21 at 14 05 46 confing env:
env: { 
            "allure": "true",
            "allureResults": "../../../allure-results",
            "allureAddVideoOnPass": "true",
            "allureSkipCommands": 'intercept,then,testParameters,wrap,wait',
            "allureSkipSteps": '"after each" hook*,"before each" hook*,"after all",ignore-allure-log',
        },
@mmisty
Copy link
Owner

mmisty commented Dec 21, 2023

Hi @Paprikh7
Did you run these tests in interactive mode or in run mode?
If interactive, could you please confirm that the same happens in run mode?
thank you

@Paprikh7
Copy link
Author

It was run mode
Thank you

@mmisty
Copy link
Owner

mmisty commented Dec 29, 2023

@Paprikh7 could you please confirm that the same happens when you use 1 'describe' instead of 2 nested ones?

by the way - if you use second describe just to have better structure in your the report you can use allure interface to achieve that instead of creating more describes. let me know if you need more info.

@Paprikh7
Copy link
Author

Paprikh7 commented Jan 2, 2024

It won't happen, when I use 1 'describe'.
It happen only use 2 or more 'describe'.

@mmisty mmisty added bug Something isn't working medium severity of issue labels May 30, 2024
mmisty added a commit that referenced this issue Jun 28, 2024
@mmisty
Copy link
Owner

mmisty commented Jun 28, 2024

should be fixed in v2.0.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working medium severity of issue
Projects
None yet
2 participants