chore(repo): run all cypress e2e tests headless and w/o watch (#6125)

This commit is contained in:
Miroslav Jonaš 2021-06-25 12:59:51 +02:00 committed by GitHub
parent 3c0afc9fdd
commit f77bc78cba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 8 deletions

View File

@ -8,6 +8,7 @@ import {
readFile,
removeProject,
runCLI,
runCypressTests,
tmpProjPath,
uniq,
} from '@nrwl/e2e/utils';
@ -179,9 +180,13 @@ describe('Storybook schematics', () => {
`
);
expect(runCLI(`run ${myAngularLib}-e2e:e2e --no-watch`)).toContain(
'All specs passed!'
if (runCypressTests()) {
const e2eResults = runCLI(
`e2e ${myAngularLib}-e2e --headless --no-watch`
);
expect(e2eResults).toContain('All specs passed!');
expect(await killPorts()).toBeTruthy();
}
runCLI(`run ${myAngularLib}:build-storybook`);
@ -189,7 +194,6 @@ describe('Storybook schematics', () => {
expect(readFile(`dist/storybook/${myAngularLib}/index.html`)).toContain(
`<title>Storybook</title>`
);
expect(await killPorts()).toBeTruthy();
}
}, 1000000);

View File

@ -673,7 +673,7 @@ async function checkApp(
}
if (opts.checkE2E && runCypressTests()) {
const e2eResults = runCLI(`e2e ${appName}-e2e --headless`);
const e2eResults = runCLI(`e2e ${appName}-e2e --headless --no-watch`);
expect(e2eResults).toContain('All specs passed!');
expect(await killPorts()).toBeTruthy();
}

View File

@ -62,7 +62,7 @@ describe('Nx Plugin', () => {
runCLI(`generate @nrwl/nx-plugin:plugin ${plugin} --linter=eslint`);
if (isNotWindows() && runCypressTests()) {
const e2eResults = runCLI(`e2e ${plugin}-e2e --no-watch --headless`);
const e2eResults = runCLI(`e2e ${plugin}-e2e --headless --no-watch`);
expect(e2eResults).toContain('Running target "e2e" succeeded');
expect(await killPorts()).toBeTruthy();
}

View File

@ -395,7 +395,7 @@ describe('React Applications', () => {
);
if (opts.checkE2E && runCypressTests()) {
const e2eResults = runCLI(`e2e ${appName}-e2e`);
const e2eResults = runCLI(`e2e ${appName}-e2e --headless --no-watch`);
expect(e2eResults).toContain('All specs passed!');
expect(await killPorts()).toBeTruthy();
}

View File

@ -56,7 +56,7 @@ describe('Web Components Applications', () => {
expect(lintE2eResults).toContain('All files pass linting.');
if (isNotWindows() && runCypressTests()) {
const e2eResults = runCLI(`e2e ${appName}-e2e --headless`);
const e2eResults = runCLI(`e2e ${appName}-e2e --headless --no-watch`);
expect(e2eResults).toContain('All specs passed!');
expect(await killPorts()).toBeTruthy();
}