Skip to content

Commit 3cbbf45

Browse files
alan-agius4jkrems
authored andcommitted
refactor: handle standalone by default change
In tests, add `standalone: false` where it's missing. Note: In the future, we should update our integration tests to use a standalone app.
1 parent 3db884a commit 3cbbf45

File tree

22 files changed

+31
-86
lines changed

22 files changed

+31
-86
lines changed

modules/testing/builder/projects/hello-world-app/src/app/app.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { Component } from '@angular/core';
1010

1111
@Component({
1212
selector: 'app-root',
13+
standalone: false,
1314
templateUrl: './app.component.html',
1415
styleUrls: ['./app.component.css'],
1516
})

packages/angular/build/src/builders/application/tests/behavior/rebuild-errors_spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
2727

2828
const goodDirectiveContents = `
2929
import { Directive, Input } from '@angular/core';
30-
@Directive({ selector: 'dir' })
30+
@Directive({ selector: 'dir', standalone: false })
3131
export class Dir {
3232
@Input() foo: number;
3333
}
@@ -66,6 +66,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
6666
import { Component } from '@angular/core'
6767
@Component({
6868
selector: 'app-root',
69+
standalone: false,
6970
template: '<dir [foo]="123">',
7071
})
7172
export class AppComponent { }
@@ -87,7 +88,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
8788
'src/app/dir.ts',
8889
`
8990
import { Directive, Input } from '@angular/core';
90-
@Directive({ selector: 'dir' })
91+
@Directive({ selector: 'dir', standalone: false })
9192
export class Dir {
9293
@Input() foo: string;
9394
}

packages/angular/build/src/builders/application/tests/behavior/rebuild-general_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
3838
import './file-a';
3939
@Component({
4040
selector: 'app-root',
41+
standalone: false,
4142
template: 'App component',
4243
})
4344
export class AppComponent { }

packages/angular/build/src/builders/application/tests/behavior/rebuild-web-workers_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
4747
import { Component } from '@angular/core'
4848
@Component({
4949
selector: 'app-root',
50+
standalone: false,
5051
template: '<h1>Worker Test</h1>',
5152
})
5253
export class AppComponent {

packages/angular/build/src/builders/application/tests/behavior/web-workers-application_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
4242
import { Component } from '@angular/core'
4343
@Component({
4444
selector: 'app-root',
45+
standalone: false,
4546
template: '<h1>Worker Test</h1>',
4647
})
4748
export class AppComponent {

packages/angular/build/src/builders/application/tests/options/app-shell_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const appShellRouteFiles: Record<string, string> = {
1616
1717
@Component({
1818
selector: 'app-app-shell',
19+
standalone: false,
1920
styles: ['div { color: #fff; }'],
2021
template: '<p>app-shell works!</p>',
2122
})

packages/angular/build/src/builders/application/tests/options/external-dependencies_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ describeBuilder(buildApplication, APPLICATION_BUILDER_INFO, (harness) => {
6161
import { Component } from '@angular/core'
6262
@Component({
6363
selector: 'app-root',
64+
standalone: false,
6465
template: '<h1>Worker Test</h1>',
6566
})
6667
export class AppComponent {

packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ describe('AppShell Builder', () => {
3434
3535
@Component({
3636
selector: 'app-app-shell',
37+
standalone: false,
3738
templateUrl: './app-shell.component.html',
3839
})
3940
export class AppShellComponent implements OnInit {

packages/angular_devkit/build_angular/src/builders/browser/specs/styles_spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ describe('Browser Builder styles', () => {
7373
7474
@Component({
7575
selector: 'app-root',
76+
standalone: false,
7677
templateUrl: './app.component.html',
7778
styleUrls: []
7879
})
@@ -92,6 +93,7 @@ describe('Browser Builder styles', () => {
9293
9394
@Component({
9495
selector: 'app-root',
96+
standalone: false,
9597
templateUrl: './app.component.html',
9698
styles: ['div { mask-composite: add; }'],
9799
})
@@ -118,6 +120,7 @@ describe('Browser Builder styles', () => {
118120
119121
@Component({
120122
selector: 'app-root',
123+
standalone: false,
121124
templateUrl: './app.component.html',
122125
styles: ['div { mask-composite: add; }'],
123126
})
@@ -637,6 +640,7 @@ describe('Browser Builder styles', () => {
637640
638641
@Component({
639642
selector: 'app-root',
643+
standalone: false,
640644
templateUrl: './app.component.html',
641645
styleUrls: ['../styles.css']
642646
})

packages/angular_devkit/build_angular/src/builders/browser/specs/svg_spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ describe('Browser Builder allow svg', () => {
3333
3434
@Component({
3535
selector: 'app-root',
36+
standalone: false,
3637
templateUrl: './app.component.svg',
3738
styleUrls: []
3839
})

0 commit comments

Comments
 (0)