Adding screenshots automatically to report #209
-
Hi @mmisty , I see in documentation this line "automatically adds videos / screenshots" Cypress.Commands.add('logStep', function (description: string, stepFunc: () => any) {
cy.allure().startStep(description);
//step function that will be executed
stepFunc();
cy.screenshot({ allureAttachToStep: true });
cy.allure().endStep();
}); Could you please explain how automatic screenshots work? Maybe I missed something... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hello, @Yevhenii-TA Could you attach your e2e.ts file (support file) so I can understand what's wrong From plugin side it should be one screenshot in a step when you do one screenshot. |
Beta Was this translation helpful? Give feedback.
I see that you are exporting a function from index.ts, which you better not doing sine all the things that are in index.ts will be duplicated if you try to import the function within your test
If you want to use this function better to create separate file and put it there.
also minor thing - e2e.ts file seems to be unused- you usually need to have one e2e.ts or index.ts and refer it from your cypress config file.