fix(testing): add cleanup on cypress e2e tests (#12089)
This commit is contained in:
parent
f84f2819f6
commit
96be1f55fe
@ -1,5 +1,6 @@
|
||||
import {
|
||||
checkFilesDoNotExist,
|
||||
cleanupProject,
|
||||
createFile,
|
||||
newProject,
|
||||
runCLI,
|
||||
@ -144,6 +145,8 @@ import {CommonModule} from '@angular/common';
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(() => cleanupProject());
|
||||
|
||||
it('should test app', () => {
|
||||
runCLI(
|
||||
`generate @nrwl/angular:cypress-component-configuration --project=${appName} --generate-tests --no-interactive`
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import {
|
||||
checkFilesExist,
|
||||
cleanupProject,
|
||||
createFile,
|
||||
killPorts,
|
||||
newProject,
|
||||
@ -12,9 +13,13 @@ import {
|
||||
|
||||
describe('Cypress E2E Test runner', () => {
|
||||
const myapp = uniq('myapp');
|
||||
|
||||
beforeAll(() => {
|
||||
newProject();
|
||||
});
|
||||
|
||||
afterAll(() => cleanupProject());
|
||||
|
||||
it('should generate an app with the Cypress as e2e test runner', () => {
|
||||
runCLI(
|
||||
`generate @nrwl/react:app ${myapp} --e2eTestRunner=cypress --linter=eslint`
|
||||
|
||||
@ -6,6 +6,7 @@ import {
|
||||
uniq,
|
||||
updateFile,
|
||||
expectJestTestsToPass,
|
||||
cleanupProject,
|
||||
} from '@nrwl/e2e/utils';
|
||||
|
||||
describe('Jest', () => {
|
||||
@ -13,6 +14,8 @@ describe('Jest', () => {
|
||||
newProject({ name: uniq('proj-jest') });
|
||||
});
|
||||
|
||||
afterAll(() => cleanupProject());
|
||||
|
||||
it('should be able test projects using jest', async () => {
|
||||
await expectJestTestsToPass('@nrwl/workspace:lib');
|
||||
await expectJestTestsToPass('@nrwl/js:lib');
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import {
|
||||
cleanupProject,
|
||||
createFile,
|
||||
newProject,
|
||||
runCLI,
|
||||
@ -12,6 +13,7 @@ describe('React Cypress Component Tests', () => {
|
||||
const appName = uniq('cy-react-app');
|
||||
const usedInAppLibName = uniq('cy-react-lib');
|
||||
const buildableLibName = uniq('cy-react-buildable-lib');
|
||||
|
||||
beforeAll(() => {
|
||||
projectName = newProject({ name: uniq('cy-react') });
|
||||
runCLI(`generate @nrwl/react:app ${appName} --no-interactive`);
|
||||
@ -117,6 +119,8 @@ export default Input;
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(() => cleanupProject());
|
||||
|
||||
it('should test app', () => {
|
||||
runCLI(
|
||||
`generate @nrwl/react:cypress-component-configuration --project=${appName} --generate-tests`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user