Skip to content

Commit f79f8b1

Browse files
alan-agius4clydin
authored andcommitted
test: update colors in inlineStyleLanguage test
`color: green` is not part of the compiler code angular/angular@15.0.0-next.4...15.0.0-next.5#diff-6051c2c8a3dc4a133880a8344097be738955132464028402155390c38e0ad18aR197 which causes our tests to fail. This replaces color `green` with another color `indianred`.
1 parent 0ad0e0c commit f79f8b1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

packages/angular_devkit/build_angular/src/builders/browser/tests/options/inline-style-language_spec.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
3232
});
3333

3434
await harness.modifyFile('src/app/app.component.ts', (content) =>
35-
content.replace('__STYLE_MARKER__', '$primary: green;\\nh1 { color: $primary; }'),
35+
content.replace('__STYLE_MARKER__', '$primary: indianred;\\nh1 { color: $primary; }'),
3636
);
3737

3838
const { result } = await harness.executeOnce();
3939

4040
expect(result?.success).toBe(true);
41-
harness.expectFile('dist/main.js').content.toContain('color: green');
41+
harness.expectFile('dist/main.js').content.toContain('color: indianred');
4242
});
4343

4444
it('supports Sass inline component styles when set to "sass"', async () => {
@@ -49,13 +49,13 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
4949
});
5050

5151
await harness.modifyFile('src/app/app.component.ts', (content) =>
52-
content.replace('__STYLE_MARKER__', '$primary: green\\nh1\\n\\tcolor: $primary'),
52+
content.replace('__STYLE_MARKER__', '$primary: indianred\\nh1\\n\\tcolor: $primary'),
5353
);
5454

5555
const { result } = await harness.executeOnce();
5656

5757
expect(result?.success).toBe(true);
58-
harness.expectFile('dist/main.js').content.toContain('color: green');
58+
harness.expectFile('dist/main.js').content.toContain('color: indianred');
5959
});
6060

6161
it('supports Less inline component styles when set to "less"', async () => {
@@ -66,13 +66,13 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
6666
});
6767

6868
await harness.modifyFile('src/app/app.component.ts', (content) =>
69-
content.replace('__STYLE_MARKER__', '@primary: green;\\nh1 { color: @primary; }'),
69+
content.replace('__STYLE_MARKER__', '@primary: indianred;\\nh1 { color: @primary; }'),
7070
);
7171

7272
const { result } = await harness.executeOnce();
7373

7474
expect(result?.success).toBe(true);
75-
harness.expectFile('dist/main.js').content.toContain('color: green');
75+
harness.expectFile('dist/main.js').content.toContain('color: indianred');
7676
});
7777

7878
it('updates produced stylesheet in watch mode', async () => {
@@ -85,7 +85,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
8585
});
8686

8787
await harness.modifyFile('src/app/app.component.ts', (content) =>
88-
content.replace('__STYLE_MARKER__', '$primary: green;\\nh1 { color: $primary; }'),
88+
content.replace('__STYLE_MARKER__', '$primary: indianred;\\nh1 { color: $primary; }'),
8989
);
9090

9191
const buildCount = await harness
@@ -97,18 +97,18 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
9797

9898
switch (index) {
9999
case 0:
100-
harness.expectFile('dist/main.js').content.toContain('color: green');
100+
harness.expectFile('dist/main.js').content.toContain('color: indianred');
101101
harness.expectFile('dist/main.js').content.not.toContain('color: aqua');
102102

103103
await harness.modifyFile('src/app/app.component.ts', (content) =>
104104
content.replace(
105-
'$primary: green;\\nh1 { color: $primary; }',
105+
'$primary: indianred;\\nh1 { color: $primary; }',
106106
'$primary: aqua;\\nh1 { color: $primary; }',
107107
),
108108
);
109109
break;
110110
case 1:
111-
harness.expectFile('dist/main.js').content.not.toContain('color: green');
111+
harness.expectFile('dist/main.js').content.not.toContain('color: indianred');
112112
harness.expectFile('dist/main.js').content.toContain('color: aqua');
113113

114114
await harness.modifyFile('src/app/app.component.ts', (content) =>
@@ -119,7 +119,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
119119
);
120120
break;
121121
case 2:
122-
harness.expectFile('dist/main.js').content.not.toContain('color: green');
122+
harness.expectFile('dist/main.js').content.not.toContain('color: indianred');
123123
harness.expectFile('dist/main.js').content.not.toContain('color: aqua');
124124
harness.expectFile('dist/main.js').content.toContain('color: blue');
125125
break;

0 commit comments

Comments
 (0)