Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const argv = require('yargs').argv;
const uploadOutput = require('../utils/upload-output');
const retry = require('protractor-retry').retry;
const FOLDER = process.env.FOLDER || '',
SAVE_SCREENSHOT = process.env.SAVE_SCREENSHOT === 'true';
async function afterLaunch(statusCode) {
if (SAVE_SCREENSHOT && statusCode === 1) {
console.log(`Status code is ${statusCode}, trying to save screenshots.`);
let retryCount = 1;
if (argv.retry) {
retryCount = ++argv.retry;
}
try {
console.log('Retry number: ', retryCount);
await uploadOutput(FOLDER, retryCount);
const retry = require('protractor-retry').retry;
async function onCleanUp(results) {
if (process.env.CI) {
retry.onCleanUp(results);
}
}
module.exports = onCleanUp;
const path = require('path');
const { SpecReporter } = require('jasmine-spec-reporter');
const retry = require('protractor-retry').retry;
const tsConfig = require('./e2e/tsconfig.e2e.json');
const AlfrescoApi = require('@alfresco/js-api').AlfrescoApiCompatibility;
const TestConfig = require('./e2e/test.config');
const RESOURCES = require('./e2e/util/resources');
const SmartRunner = require('protractor-smartrunner');
const resolve = require('path').resolve;
require('ts-node').register({
project: './lib/testing/tsconfig.lib.json'
});
const ACTIVITI_CLOUD_APPS = require('./lib/testing').ACTIVITI_CLOUD_APPS;
const { beforeAllRewrite, afterAllRewrite, beforeEachAllRewrite, afterEachAllRewrite } = require('./e2e/protractor/override-jasmine');
const { uploadScreenshot, saveReport, cleanReportFolder } = require('./e2e/protractor/save-remote');
const argv = require('yargs').argv;
const SpecReporter = require ('jasmine-spec-reporter').SpecReporter;
const jasmineReporters = require('jasmine-reporters') ;
const disableCSSAnimation = require('../utils/disable-css-animation');
const fs = require('fs-extra');
const config = require('../config');
const retry = require('protractor-retry').retry;
const configTs = require(__dirname + '/../../tsconfig.e2e.json');
const SmartRunner = require('protractor-smartrunner');
function onPrepare() {
if (process.env.CI) {
retry.onPrepare();
SmartRunner.apply({
outputDirectory: process.env.COMMUNITY_SMARTRUNNER_DIR || './.protractor-smartrunner',
repoHash: process.env.GIT_HASH
});
}
require('ts-node').register({ project: './e2e/tsconfig.e2e.json' });
require('tsconfig-paths').register({baseUrl: './e2e', paths: configTs.compilerOptions.paths});