How to use the terra-toolkit/lib/wdio/conf.config function in terra-toolkit

To help you get started, we’ve selected a few terra-toolkit 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 cerner / terra-framework / wdio.conf.js View on Github external
const wdioConf = require('terra-toolkit/lib/wdio/conf');
const ExpressDevService = require('terra-toolkit/lib/wdio/services/index').ExpressDevService;
const localIP = require('ip');
const path = require('path');
const webpackConfig = require('terra-dev-site/src/config/webpack.config.js');

const webpackPort = 8080;

// Flex specs search between local pacakge and repo
let specs = path.join('tests', 'wdio', '**', '*-spec.js');
if (__dirname === process.cwd()) {
  specs = path.join('packages', '*', specs);
}

const config = {
  ...wdioConf.config,

  baseUrl: `http://${localIP.address()}:${webpackPort}`,
  specs,

  // Ignore deprecation warnings. When chrome supports /actions API we'll update to use those.
  deprecationWarnings: false,

  webpackPort,
  webpackConfig,
  axe: {
    inject: true,
    options: {
      rules: [{
        id: 'landmark-one-main',
        enabled: false,
      }],
github cerner / terra-framework / wdio.conf.js View on Github external
}],
    },
  },
  terra: {
    selector: '[data-terra-dev-site-content] *:first-child',
  },

  beforeHook() {
    // Being Terra tests are executed on an SPA, a full refresh is required
    // in order to reset the site. This ensures customProperty tests and any
    // other dom modifications are cleared before starting a test.
    global.browser.refresh();
  },
};

config.services = wdioConf.config.services.concat([ExpressDevService]);
exports.config = config;
github cerner / terra-clinical / wdio.conf.js View on Github external
const webpackConfig = require('./webpack.config.js');
const ExpressDevService = require('terra-toolkit/lib/wdio/services/index').ExpressDevService;
const localIP = require('ip');
const path = require('path');

const webpackPort = 8080;
const isRepoTest = __dirname === process.cwd();

// Flex specs search between local pacakge and repo
let specs = path.join('tests', 'wdio', '**', '*-spec.js');
if (isRepoTest) {
  specs = path.join('packages', 'terra-*', specs);
}

const config = {
  ...wdioConf.config,
  baseUrl: `http://${localIP.address()}:${webpackPort}`,
  specs: [specs],
  exclude: [
    'packages/terra-clinical-error-view/tests/wdio/**/*-spec.js',
  ],

  // Configuration for terra-toolkit's SeleniumDocker service
  seleniumDocker: {
    cleanup: false,
    env: {
      TZ: 'America/Chicago',
    },
  },

  axe: {
    inject: true,
github cerner / terra-clinical / wdio.conf.js View on Github external
id: 'landmark-one-main',
        enabled: false,
      }],
    },
  },

  // global visual-regression selector
  terra: {
    selector: '[data-terra-dev-site-content] *:first-child',
  },

   // Configuration for ExpressDevService
  webpackConfig,
};

config.services = wdioConf.config.services.concat([ExpressDevService]);
exports.config = config;