fix(@nguniversal/common): correctly handle multiple lazy CSS files · angular/universal@b603f35 · GitHub
Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit b603f35

Browse files
committed
fix(@nguniversal/common): correctly handle multiple lazy CSS files
This commit fixes an issue with the regexp that caused incorrect output. Closes #3128
1 parent 2e4ce0d commit b603f35

4 files changed

Lines changed: 19 additions & 4 deletions

File tree

‎integration/express-engine-ivy/angular.json‎

Lines changed: 8 additions & 1 deletion

‎integration/express-engine-ivy/e2e/src/app.e2e-spec.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ describe('Hello world E2E Tests', () => {
6161
await browser.driver.get(browser.baseUrl);
6262

6363
// Test the contents from the server.
64-
const styleTag = browser.driver.findElement(by.css('link[rel="stylesheet"]'));
65-
expect(styleTag.getAttribute('media')).toMatch('all');
64+
const linkTags = await browser.driver.findElements(by.css('link[rel="stylesheet"]'));
65+
expect(linkTags.length).toBe(2);
66+
67+
for (const linkTag of linkTags) {
68+
expect(linkTag.getAttribute('media')).toMatch('all');
69+
}
6670

6771
// Make sure there were no client side errors.
6872
verifyNoBrowserErrors();
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* You can add global styles to this file, and also import other style files */
2+
.foo {
3+
background-color: blue;
4+
}

‎modules/common/engine/src/engine.ts‎

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)