"use strict";

var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");

var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");

_Object$defineProperty(exports, "__esModule", {
  value: true
});

exports.default = void 0;

var _path = require("path");

var _pluginSequence = _interopRequireDefault(require("@start/plugin-sequence"));

var _pluginEnv = _interopRequireDefault(require("@start/plugin-env"));

var _buildInfo = _interopRequireDefault(require("./plugins/buildInfo"));

var _cypress = _interopRequireDefault(require("./plugins/cypress"));

// TODO
const config = {
  'sourceType': 'module',
  'viewportWidth': 1280,
  'viewportHeight': 800,
  'video': false,
  'testFiles': '{,!(node_modules)/**/}/*.spec.js',
  'ignoreTestFiles': 'cypress/screenshots/**/*',
  'integrationFolder': '',
  'pluginsFile': './cypress/plugins/index.js',
  // 'pluginsFile': relative(join(process.cwd(), '../'), join(__dirname, '../cypress/plugins/index.js')),
  'supportFile': './cypress/support/index.js' // 'supportFile': relative(join(process.cwd(), '../'), join(__dirname, '../cypress/support/index.js')),

};

var _default = options => {
  const {
    force,
    open,
    path,
    loadData = false,
    locale = 'en-GB'
  } = options;
  return (0, _pluginSequence.default)((0, _buildInfo.default)(['node'], {
    force
  }), (0, _pluginEnv.default)({
    COSMIC_PATH: path,
    LOAD_DATA: loadData,
    LOCALE: locale
  }), (0, _cypress.default)(config, open, loadData, locale));
};

exports.default = _default;
module.exports = exports.default;