cleanup(testing): ensure cypress installed for comp tests (#15147)
This commit is contained in:
parent
61e28c63c3
commit
19bfd8ef6a
@ -4,6 +4,7 @@ import {
|
|||||||
createFile,
|
createFile,
|
||||||
newProject,
|
newProject,
|
||||||
runCLI,
|
runCLI,
|
||||||
|
runCypressTests,
|
||||||
uniq,
|
uniq,
|
||||||
updateFile,
|
updateFile,
|
||||||
updateProjectConfig,
|
updateProjectConfig,
|
||||||
@ -174,18 +175,22 @@ import {CommonModule} from '@angular/common';
|
|||||||
runCLI(
|
runCLI(
|
||||||
`generate @nrwl/angular:cypress-component-configuration --project=${appName} --generate-tests --no-interactive`
|
`generate @nrwl/angular:cypress-component-configuration --project=${appName} --generate-tests --no-interactive`
|
||||||
);
|
);
|
||||||
|
if (runCypressTests()) {
|
||||||
expect(runCLI(`component-test ${appName} --no-watch`)).toContain(
|
expect(runCLI(`component-test ${appName} --no-watch`)).toContain(
|
||||||
'All specs passed!'
|
'All specs passed!'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}, 300_000);
|
}, 300_000);
|
||||||
|
|
||||||
it('should successfully component test lib being used in app', () => {
|
it('should successfully component test lib being used in app', () => {
|
||||||
runCLI(
|
runCLI(
|
||||||
`generate @nrwl/angular:cypress-component-configuration --project=${usedInAppLibName} --generate-tests --no-interactive`
|
`generate @nrwl/angular:cypress-component-configuration --project=${usedInAppLibName} --generate-tests --no-interactive`
|
||||||
);
|
);
|
||||||
|
if (runCypressTests()) {
|
||||||
expect(runCLI(`component-test ${usedInAppLibName} --no-watch`)).toContain(
|
expect(runCLI(`component-test ${usedInAppLibName} --no-watch`)).toContain(
|
||||||
'All specs passed!'
|
'All specs passed!'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}, 300_000);
|
}, 300_000);
|
||||||
|
|
||||||
it('should test buildable lib not being used in app', () => {
|
it('should test buildable lib not being used in app', () => {
|
||||||
@ -260,9 +265,11 @@ describe(InputStandaloneComponent.name, () => {
|
|||||||
runCLI(
|
runCLI(
|
||||||
`generate @nrwl/angular:cypress-component-configuration --project=${buildableLibName} --generate-tests --build-target=${appName}:build --no-interactive`
|
`generate @nrwl/angular:cypress-component-configuration --project=${buildableLibName} --generate-tests --build-target=${appName}:build --no-interactive`
|
||||||
);
|
);
|
||||||
|
if (runCypressTests()) {
|
||||||
expect(runCLI(`component-test ${buildableLibName} --no-watch`)).toContain(
|
expect(runCLI(`component-test ${buildableLibName} --no-watch`)).toContain(
|
||||||
'All specs passed!'
|
'All specs passed!'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// add tailwind
|
// add tailwind
|
||||||
runCLI(
|
runCLI(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user