chore(repo): run all cypress e2e tests headless and w/o watch (#6125)
This commit is contained in:
parent
3c0afc9fdd
commit
f77bc78cba
@ -8,6 +8,7 @@ import {
|
|||||||
readFile,
|
readFile,
|
||||||
removeProject,
|
removeProject,
|
||||||
runCLI,
|
runCLI,
|
||||||
|
runCypressTests,
|
||||||
tmpProjPath,
|
tmpProjPath,
|
||||||
uniq,
|
uniq,
|
||||||
} from '@nrwl/e2e/utils';
|
} from '@nrwl/e2e/utils';
|
||||||
@ -179,9 +180,13 @@ describe('Storybook schematics', () => {
|
|||||||
`
|
`
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(runCLI(`run ${myAngularLib}-e2e:e2e --no-watch`)).toContain(
|
if (runCypressTests()) {
|
||||||
'All specs passed!'
|
const e2eResults = runCLI(
|
||||||
);
|
`e2e ${myAngularLib}-e2e --headless --no-watch`
|
||||||
|
);
|
||||||
|
expect(e2eResults).toContain('All specs passed!');
|
||||||
|
expect(await killPorts()).toBeTruthy();
|
||||||
|
}
|
||||||
|
|
||||||
runCLI(`run ${myAngularLib}:build-storybook`);
|
runCLI(`run ${myAngularLib}:build-storybook`);
|
||||||
|
|
||||||
@ -189,7 +194,6 @@ describe('Storybook schematics', () => {
|
|||||||
expect(readFile(`dist/storybook/${myAngularLib}/index.html`)).toContain(
|
expect(readFile(`dist/storybook/${myAngularLib}/index.html`)).toContain(
|
||||||
`<title>Storybook</title>`
|
`<title>Storybook</title>`
|
||||||
);
|
);
|
||||||
expect(await killPorts()).toBeTruthy();
|
|
||||||
}
|
}
|
||||||
}, 1000000);
|
}, 1000000);
|
||||||
|
|
||||||
|
|||||||
@ -673,7 +673,7 @@ async function checkApp(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (opts.checkE2E && runCypressTests()) {
|
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(e2eResults).toContain('All specs passed!');
|
||||||
expect(await killPorts()).toBeTruthy();
|
expect(await killPorts()).toBeTruthy();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,7 +62,7 @@ describe('Nx Plugin', () => {
|
|||||||
runCLI(`generate @nrwl/nx-plugin:plugin ${plugin} --linter=eslint`);
|
runCLI(`generate @nrwl/nx-plugin:plugin ${plugin} --linter=eslint`);
|
||||||
|
|
||||||
if (isNotWindows() && runCypressTests()) {
|
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(e2eResults).toContain('Running target "e2e" succeeded');
|
||||||
expect(await killPorts()).toBeTruthy();
|
expect(await killPorts()).toBeTruthy();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -395,7 +395,7 @@ describe('React Applications', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (opts.checkE2E && runCypressTests()) {
|
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(e2eResults).toContain('All specs passed!');
|
||||||
expect(await killPorts()).toBeTruthy();
|
expect(await killPorts()).toBeTruthy();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,7 +56,7 @@ describe('Web Components Applications', () => {
|
|||||||
expect(lintE2eResults).toContain('All files pass linting.');
|
expect(lintE2eResults).toContain('All files pass linting.');
|
||||||
|
|
||||||
if (isNotWindows() && runCypressTests()) {
|
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(e2eResults).toContain('All specs passed!');
|
||||||
expect(await killPorts()).toBeTruthy();
|
expect(await killPorts()).toBeTruthy();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user