Update protractor.conf.js (#1606)

* Update protractor.conf.js

* add option to retry for wanted executions

* cahnges
This commit is contained in:
Eugenio Romano
2020-08-14 15:32:52 +01:00
committed by GitHub
parent f908005178
commit 8096741398
4 changed files with 144 additions and 39 deletions

View File

@@ -1,21 +0,0 @@
const uploadOutput = require('../utils/upload-output');
const SAVE_SCREENSHOT = process.env.SAVE_SCREENSHOT === 'true';
async function afterLaunch() {
if (SAVE_SCREENSHOT) {
console.log(`Save screenshot is ${SAVE_SCREENSHOT}, trying to save screenshots.`);
try {
await uploadOutput();
console.log('Screenshots saved successfully.');
} catch (e) {
console.log('Error happened while trying to upload screenshots and test reports: ', e);
}
} else {
console.log(`Save screenshot is ${SAVE_SCREENSHOT}, no need to save screenshots.`);
}
}
module.exports = afterLaunch;