From 945713ecd00f2d60405a528674528c847d449afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Mon, 23 Oct 2023 12:16:10 +0200 Subject: [PATCH] cleanup(angular): fix e2e tests (#19789) --- e2e/angular-core/src/ng-add.test.ts | 10 +++++----- e2e/nx-init/src/nx-init-angular.test.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/e2e/angular-core/src/ng-add.test.ts b/e2e/angular-core/src/ng-add.test.ts index 0f284e4dd87c8..5c65714750d31 100644 --- a/e2e/angular-core/src/ng-add.test.ts +++ b/e2e/angular-core/src/ng-add.test.ts @@ -221,8 +221,8 @@ describe('convert Angular CLI workspace to an Nx workspace', () => { expect(projectConfig.targets.serve).toEqual({ executor: '@angular-devkit/build-angular:dev-server', configurations: { - production: { browserTarget: `${project}:build:production` }, - development: { browserTarget: `${project}:build:development` }, + production: { buildTarget: `${project}:build:production` }, + development: { buildTarget: `${project}:build:development` }, }, defaultConfiguration: 'development', }); @@ -257,7 +257,7 @@ describe('convert Angular CLI workspace to an Nx workspace', () => { }); runCLI(`build ${project} --configuration production --outputHashing none`); - checkFilesExist(`dist/apps/${project}/main.js`); + checkFilesExist(`dist/apps/${project}/browser/main.js`); }); it('should handle a workspace with cypress v9', () => { @@ -450,7 +450,7 @@ describe('convert Angular CLI workspace to an Nx workspace', () => { expect(output).toContain( `Successfully ran target build for project ${project}` ); - checkFilesExist(`dist/apps/${project}/main.js`); + checkFilesExist(`dist/apps/${project}/browser/main.js`); output = runCLI(`build ${project} --outputHashing none`); expect(output).toContain( @@ -468,7 +468,7 @@ describe('convert Angular CLI workspace to an Nx workspace', () => { expect(output).toContain( `Successfully ran target build for project ${app1}` ); - checkFilesExist(`dist/apps/${app1}/main.js`); + checkFilesExist(`dist/apps/${app1}/browser/main.js`); output = runCLI(`build ${app1} --outputHashing none`); expect(output).toContain( diff --git a/e2e/nx-init/src/nx-init-angular.test.ts b/e2e/nx-init/src/nx-init-angular.test.ts index ab94b99f62c7a..3f7a7489837c9 100644 --- a/e2e/nx-init/src/nx-init-angular.test.ts +++ b/e2e/nx-init/src/nx-init-angular.test.ts @@ -49,7 +49,7 @@ describe('nx init (Angular CLI)', () => { expect(coldBuildOutput).toContain( `Successfully ran target build for project ${project}` ); - checkFilesExist(`dist/${project}/main.js`); + checkFilesExist(`dist/${project}/browser/main.js`); // run build again to check is coming from cache const cachedBuildOutput = runCLI(`build ${project} --outputHashing none`); @@ -83,7 +83,7 @@ describe('nx init (Angular CLI)', () => { expect(coldBuildOutput).toContain( `Successfully ran target build for project ${project}` ); - checkFilesExist(`dist/apps/${project}/main.js`); + checkFilesExist(`dist/apps/${project}/browser/main.js`); // run build again to check is coming from cache const cachedBuildOutput = runCLI(`build ${project} --outputHashing none`);