test: update ng generate e2e calls to ng generate private-e2e.

This commit is contained in:
Doug Parker 2024-10-14 16:24:04 -07:00 committed by Douglas Parker
parent 62877bdf2b
commit c79afde0f3
5 changed files with 16 additions and 8 deletions

View File

@ -49,7 +49,7 @@ describe('Application Schematic', () => {
});
it('should create all files of e2e in an application', async () => {
const tree = await schematicRunner.runSchematic('e2e', defaultOptions, applicationTree);
const tree = await schematicRunner.runSchematic('private-e2e', defaultOptions, applicationTree);
const files = tree.files;
expect(files).toEqual(
@ -64,7 +64,11 @@ describe('Application Schematic', () => {
describe('workspace config', () => {
it('should add e2e targets for the app', async () => {
const tree = await schematicRunner.runSchematic('e2e', defaultOptions, applicationTree);
const tree = await schematicRunner.runSchematic(
'private-e2e',
defaultOptions,
applicationTree,
);
const workspace = JSON.parse(tree.readContent('/angular.json'));
const targets = workspace.projects.foo.architect;
@ -72,7 +76,11 @@ describe('Application Schematic', () => {
});
it('should set the e2e options', async () => {
const tree = await schematicRunner.runSchematic('e2e', defaultOptions, applicationTree);
const tree = await schematicRunner.runSchematic(
'private-e2e',
defaultOptions,
applicationTree,
);
const workspace = JSON.parse(tree.readContent('/angular.json'));
const { options, configurations } = workspace.projects.foo.architect.e2e;
@ -82,7 +90,7 @@ describe('Application Schematic', () => {
});
it('should add an e2e script in package.json', async () => {
const tree = await schematicRunner.runSchematic('e2e', defaultOptions, applicationTree);
const tree = await schematicRunner.runSchematic('private-e2e', defaultOptions, applicationTree);
const pkg = JSON.parse(tree.readContent('/package.json'));
expect(pkg.scripts['e2e']).toBe('ng e2e');

View File

@ -4,7 +4,7 @@ import { updateJsonFile, useCIChrome, useCIDefaults } from '../../utils/project'
export default async function () {
await ng('generate', 'app', 'test-project-two', '--no-standalone', '--skip-install');
await ng('generate', 'e2e', '--related-app-name=test-project-two');
await ng('generate', 'private-e2e', '--related-app-name=test-project-two');
// Setup testing to use CI Chrome.
await useCIChrome('test-project-two', './projects/test-project-two/e2e');

View File

@ -16,7 +16,7 @@ export default async function () {
await rimraf('node_modules/@angular/ssr');
await ng('generate', 'app', 'test-project-two', '--no-standalone', '--skip-install');
await ng('generate', 'e2e', '--related-app-name=test-project-two');
await ng('generate', 'private-e2e', '--related-app-name=test-project-two');
// Setup testing to use CI Chrome.
await useCIChrome('test-project-two', 'projects/test-project-two/e2e/');

View File

@ -72,7 +72,7 @@ export default async function () {
await ng('update', '@angular/cli', ...extraUpdateArgs);
// Generate E2E setup
await ng('generate', 'e2e', '--related-app-name=fifteen-project');
await ng('generate', 'private-e2e', '--related-app-name=fifteen-project');
// Setup testing to use CI Chrome.
await useCIChrome('fifteen-project', './');

View File

@ -51,7 +51,7 @@ export async function prepareProjectForE2e(name: string) {
console.log(`Project ${name} created... Installing packages.`);
await installWorkspacePackages();
await ng('generate', 'e2e', '--related-app-name', name);
await ng('generate', 'private-e2e', '--related-app-name', name);
await useCIChrome(name, 'e2e');
await useCIChrome(name, '');