How to use the cypress.open function in cypress

To help you get started, we’ve selected a few cypress 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 nrwl / nx / packages / cypress / src / builders / cypress / cypress.impl.ts View on Github external
if (env) {
    options.env = env;
  }
  if (spec) {
    options.spec = spec;
  }

  options.exit = exit;
  options.headed = !headless;
  options.record = record;
  options.key = key;
  options.parallel = parallel;
  options.ciBuildId = ciBuildId;

  return fromPromise(
    !isWatching || headless ? Cypress.run(options) : Cypress.open(options)
  ).pipe(
    // tap(() => (isWatching && !headless ? process.exit() : null)), // Forcing `cypress.open` to give back the terminal
    map(result => ({
      /**
       * `cypress.open` is returning `0` and is not of the same type as `cypress.run`.
       * `cypress.open` is the graphical UI, so it will be obvious to know what wasn't
       * working. Forcing the build to success when `cypress.open` is used.
       */
      success: !result.totalFailed && !result.failures
    }))
  );
}
github aurelia / cli / lib / resources / tasks / cypress.js View on Github external
export default () => {
  if (CLIOptions.hasFlag('run')) {
    cypress.run(config);
  } else {
    cypress.open(config);
  }
};
github aurelia / cli / lib / resources / tasks / cypress.ts View on Github external
export default () => {
  if (CLIOptions.hasFlag('run')) {
    cypress.run(config);
  } else {
    cypress.open(config);
  }
};

cypress

Cypress is a next generation front end testing tool built for the modern web

MIT
Latest version published 4 days ago

Package Health Score

98 / 100
Full package analysis