How to use the protractor-retry.retry function in protractor-retry

To help you get started, we’ve selected a few protractor-retry examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Activiti / activiti-modeling-app / e2e / config / hooks / after-launch.js View on Github external
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);
github Activiti / activiti-modeling-app / e2e / config / hooks / on-cleanup.js View on Github external
const retry = require('protractor-retry').retry;

async function onCleanUp(results) {
    if (process.env.CI) {
        retry.onCleanUp(results);
    }
}

module.exports = onCleanUp;
github Alfresco / alfresco-ng2-components / protractor.conf.ts View on Github external
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;
github Activiti / activiti-modeling-app / e2e / config / hooks / on-prepare.js View on Github external
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});

protractor-retry

module for protractor to automatically re-run failed tests with specific number of attempts

MIT
Latest version published 4 years ago

Package Health Score

45 / 100
Full package analysis