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

Take a screenshot on each failed expect #154

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
new compiled index.js
  • Loading branch information
Maurice Matuschek committed Jun 13, 2019
commit c2c6c6719ebd1e68208634b26eafd52be77efc3f
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -4913,8 +4913,8 @@ function expectFailed(rep) {

if (!passed) {
var baseName = self._screenshotReporter.pathBuilder(null, [expectation.message], null, null);
var tst = util.generateGuid();
var screenShotFileName = path.basename(tst + '.png');
var gUid = util.generateGuid();
var screenShotFileName = path.basename(gUid + '.png');
var screenShotFilePath = path.join(path.dirname(baseName + '.png'), self._screenshotReporter.screenshotsSubfolder);
var screenShotPath = path.join(self._screenshotReporter.baseDirectory, screenShotFilePath, screenShotFileName);
self._screenshotReporter.screenshotArray.push(path.join(self._screenshotReporter.screenshotsSubfolder, screenShotFileName));