Skip to content

Commit 0676e2a

Browse files
committed
test: verify that component styles are not empty
Some tests check for the presence of component styles in the DOM. However, with recent changes to the framework, the style tag is no longer created when styles are empty. Updated tests to ensure that component styles are not empty.
1 parent d5a3057 commit 0676e2a

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

tests/legacy-cli/e2e/tests/build/ssr/express-engine-csp-nonce.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default async function () {
2424
}
2525

2626
await writeMultipleFiles({
27+
'src/app/app.component.css': `div { color: #000 }`,
2728
'src/styles.css': `* { color: #000 }`,
2829
'src/main.ts': `import { bootstrapApplication } from '@angular/platform-browser';
2930
import { AppComponent } from './app/app.component';

tests/legacy-cli/e2e/tests/build/ssr/express-engine-ngmodule.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export default async function () {
5757
}
5858

5959
await writeMultipleFiles({
60+
'projects/test-project-two/src/app/app.component.css': `div { color: #000 }`,
6061
'projects/test-project-two/src/styles.css': `* { color: #000 }`,
6162
'projects/test-project-two/src/main.ts': `
6263
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

tests/legacy-cli/e2e/tests/build/ssr/express-engine-standalone.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default async function () {
2424
await installWorkspacePackages();
2525

2626
await writeMultipleFiles({
27+
'src/app/app.component.css': `div { color: #000 }`,
2728
'src/styles.css': `* { color: #000 }`,
2829
'src/main.ts': `import { bootstrapApplication } from '@angular/platform-browser';
2930
import { AppComponent } from './app/app.component';

0 commit comments

Comments
 (0)