Content-Length: 333565 | pFad | http://github.com/angular/components/commit/c9db72a34f961e4a331f325b0917d9dae38c7473

4B fix(material/schematics): fix rename tests · angular/components@c9db72a · GitHub
Skip to content

Commit c9db72a

Browse files
author
Andrew Seguin
committed
fix(material/schematics): fix rename tests
1 parent 302df51 commit c9db72a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/material/schematics/ng-update/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ ts_project(
6868
jasmine_test(
6969
name = "test",
7070
data = [
71+
":ng_update_index",
7172
":schematics_test_cases",
7273
":test_lib",
7374
"//src/material/schematics:collection_assets",

src/material/schematics/ng-update/test-cases/rename-mdc-tokens.spec.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {UnitTestTree} from '@angular-devkit/schematics/testing';
2-
import {createTestCaseSetup} from '@angular/cdk/schematics/testing';
2+
import {createTestCaseSetup} from '../../../../cdk/schematics/testing';
33
import {MIGRATION_PATH} from '../../paths';
44

55
const THEME_FILE_PATH = '/projects/cdk-testing/src/theme.scss';
@@ -20,12 +20,16 @@ describe('v20 rename tokens migration', () => {
2020
runMigration = testSetup.runFixers;
2121
});
2222

23-
it('should rename mdc tokens to mat', async () => {
23+
it('should rename mdc tokens to mat and change component ordering', async () => {
2424
writeFile(
2525
THEME_FILE_PATH,
2626
`
2727
html {
2828
--mdc-icon-button-icon-size: 24px;
29+
--mat-filled-button-color: red;
30+
--mat-filled-text-field-color: red;
31+
--mat-full-pseudo-checkbox-color: red;
32+
--mat-legacy-button-toggle-color: red;
2933
}
3034
`,
3135
);
@@ -36,6 +40,10 @@ describe('v20 rename tokens migration', () => {
3640
stripWhitespace(`
3741
html {
3842
--mat-icon-button-icon-size: 24px;
43+
--mat-button-filled-color: red;
44+
--mat-form-field-filled-color: red;
45+
--mat-pseudo-checkbox-full-color: red;
46+
--mat-button-toggle-legacy-color: red;
3947
}
4048
`),
4149
);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/angular/components/commit/c9db72a34f961e4a331f325b0917d9dae38c7473

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy