cli/e2e.js
function e2e(command, argv, skyPagesConfig, webpack) {
  start = new Date().getTime();
  process.on('SIGINT', killServers);

  const specsPath = path.resolve(process.cwd(), 'e2e/**/*.e2e-spec.ts');
  const specsGlob = glob.sync(specsPath);
  const configPath = configResolver.resolve(command, argv);

  if (specsGlob.length === 0) {
    logger.info('No spec files located. Skipping e2e command.');
    return killServers(0);
  }

  server.start()
    .then((port) => {
      argv.assets = 'https://localhost:' + port;

      // The assets URL is built by combining the assets URL above with
      // the app's root directory, but in e2e tests the assets files
      // are served directly from the root.  This will back up a directory
      // so that asset URLs are built relative to the root rather than
      // the app's root directory.
      argv.assetsrel = '../';

      return Promise
        .all([
          spawnBuild(argv, skyPagesConfig, webpack),
          port,
          spawnSelenium(configPath)
        ]);
    })
    .then(([chunks, port]) => {
      spawnProtractor(
        configPath,
        chunks,
        port,
        skyPagesConfig
      );
    })
    .catch(err => {
      logger.error(err);
      killServers(1);
    });
}
function e2e(command, argv, skyPagesConfig, webpack) {
  start = new Date().getTime();
  process.on('SIGINT', killServers);

  const specsPath = path.resolve(process.cwd(), 'e2e/**/*.e2e-spec.ts');
  const specsGlob = glob.sync(specsPath);
  const configPath = configResolver.resolve(command, argv);

  if (specsGlob.length === 0) {
    logger.info('No spec files located. Skipping e2e command.');
    return killServers(0);
  }

  server.start()
    .then((port) => {
      argv.assets = 'https://localhost:' + port;

      // The assets URL is built by combining the assets URL above with
      // the app's root directory, but in e2e tests the assets files
      // are served directly from the root.  This will back up a directory
      // so that asset URLs are built relative to the root rather than
      // the app's root directory.
      argv.assetsrel = '../';

      return Promise
        .all([
          spawnBuild(argv, skyPagesConfig, webpack),
          port,
          spawnSelenium(configPath)
        ]);
    })
    .then(([chunks, port]) => {
      spawnProtractor(
        configPath,
        chunks,
        port,
        skyPagesConfig
      );
    })
    .catch(err => {
      logger.error(err);
      killServers(1);
    });
}
function e2e ( command , argv , skyPagesConfig , webpack ) { start = new Date ( ) . getTime ( ) ; process . on ( 'SIGINT' , killServers ) ; const specsPath = path . resolve ( process . cwd ( ) , 'e2e/**/*.e2e-spec.ts' ) ; const specsGlob = glob . sync ( specsPath ) ; const configPath = configResolver . resolve ( command , argv ) ; if ( specsGlob . length === 0 ) { logger . info ( 'No spec files located. Skipping e2e command.' ) ; return killServers ( 0 ) ; } server . start ( ) . then ( ( port ) => { argv . assets = 'https://localhost:' + port ; // The assets URL is built by combining the assets URL above with // the app's root directory, but in e2e tests the assets files // are served directly from the root.  This will back up a directory // so that asset URLs are built relative to the root rather than // the app's root directory. argv . assetsrel = '../' ; return Promise . all ( [ spawnBuild ( argv , skyPagesConfig , webpack ) , port , spawnSelenium ( configPath ) ] ) ; } ) . then ( ( [ chunks , port ] ) => { spawnProtractor ( configPath , chunks , port , skyPagesConfig ) ; } ) . catch ( err => { logger . error ( err ) ; killServers ( 1 ) ; } ) ; }
Spawns the necessary commands for e2e.
Assumes build was ran.
@name e2e
Spawns the necessary commands for e2e . Assumes build was ran .