Closed olikbarabolik closed 2 years ago
Hi, @olikbarabolik Unfortunately I am not able to reproduce it as Allure report giving me proper results for this test code:
describe('Отчет', () => {
before(() => {
cy.allure().logStep('шаг внутри before');
});
it('test', () => {
cy.wrap(true).should('be.eq', true);
});
after(() => {
cy.allure().logStep('Шаг внутри after');
});
});
@Shelex version 2.17.2
@olikbarabolik I agree that steps api in plugin is quite weird, but there is a section in readme describing the difference between step commands. Shortly:
step('')
- creates parent step for current test (parent means that it could be stopped by next parent step only, or automatically when test\hook finishes)logStep('')
is an alias of step('', false)
- creates child step for current parent step/hook/test.startStep('')
+ endStep()
- creates step for current cypress command step / step / parent step / hook / test, so you can nest them in any way by specifying when current step finishes.So in case you want to create step for afterEach - please use logStep
instead of step
, it has quite same behaviour, but could be attached to hook. Basically step
command was designed to cover cypress-cucumber-preprocessor steps of test (Given, When, Then) where all other steps will be included.
Describe the bug Step “After” in the test body
To Reproduce Run script: describe('Отчет', () => { after(() => { cy.allure().step('Шаг внутри after') }) })
Expected behavior Steps for after\after all hooks have seporate sections
Environment (please complete the following information): • Cypress version: 8.7.0 • Allure plugin version 2.23