Skip to content

Commit

Permalink
Custom screenshot command doesn't wait for image to be taken
Browse files Browse the repository at this point in the history
  • Loading branch information
pashidlos committed Mar 22, 2021
1 parent 36f66c5 commit 8f5fa40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/commands/reportPortalCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ Cypress.Commands.add('setTestCaseId', (testCaseId, suiteTitle) => {
*/
Cypress.Commands.overwrite('screenshot', (originalFn, subject, name, option) => {
if (name) {
cy.task('rp_screenshot', {
return cy.task('rp_screenshot', {
fileName: name,
});
}).then(() => originalFn(subject, name, option));
}
originalFn(subject, name, option);
return originalFn(subject, name, option);
});

/**
Expand Down

0 comments on commit 8f5fa40

Please sign in to comment.