mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
* add screenshots * Fix protractor file * make 1 test to fail * remove method * fix build number * add log * fix folder path * fix test * fix test * Move saving screenshots to separate file * Remove failing tests
22 lines
667 B
JavaScript
22 lines
667 B
JavaScript
const uploadOutput = require('../utils/upload-output');
|
|
|
|
const SAVE_SCREENSHOT = process.env.SAVE_SCREENSHOT === 'true';
|
|
|
|
async function afterLaunch(statusCode) {
|
|
|
|
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;
|