File tree Expand file tree Collapse file tree
projects/igniteui-angular/migrations/update-21_2_0 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "$schema" : " ../../common/schema/theme-changes.schema.json" ,
3+ "changes" : [
4+ {
5+ "name" : " $base-circle-color" ,
6+ "replaceWith" : " $track-color" ,
7+ "owner" : " circular-theme" ,
8+ "type" : " property"
9+ }
10+ ]
11+ }
Original file line number Diff line number Diff line change 1+ import * as path from "path" ;
2+
3+ import {
4+ SchematicTestRunner ,
5+ UnitTestTree ,
6+ } from "@angular-devkit/schematics/testing" ;
7+ import { setupTestTree } from "../common/setup.spec" ;
8+
9+ const version = "21.2.0" ;
10+ const themes = [ "circular-theme" ] ;
11+ const testFilePath = "/testSrc/appPrefix/component/test.component.scss" ;
12+
13+ describe ( `Update to ${ version } ` , ( ) => {
14+ let appTree : UnitTestTree ;
15+ const schematicRunner = new SchematicTestRunner (
16+ "ig-migrate" ,
17+ path . join ( __dirname , "../migration-collection.json" ) ,
18+ ) ;
19+
20+ beforeEach ( ( ) => {
21+ appTree = setupTestTree ( ) ;
22+ } ) ;
23+
24+ const migrationName = "migration-55" ;
25+
26+ themes . forEach ( ( theme ) => {
27+ it ( `should rename the base circle color property of the circular progress for ${ theme } ` , async ( ) => {
28+ appTree . create (
29+ testFilePath ,
30+ `$custom-${ theme } : ${ theme } ($base-circle-color: red);` ,
31+ ) ;
32+
33+ const tree = await schematicRunner . runSchematic (
34+ migrationName ,
35+ { } ,
36+ appTree ,
37+ ) ;
38+
39+ expect ( tree . readContent ( testFilePath ) ) . toEqual (
40+ `$custom-${ theme } : ${ theme } ($track-color: red);` ,
41+ ) ;
42+ } ) ;
43+ } ) ;
44+ } ) ;
Original file line number Diff line number Diff line change 1+ import type { Rule , SchematicContext , Tree } from "@angular-devkit/schematics" ;
2+ import { UpdateChanges } from "../common/UpdateChanges" ;
3+
4+ const version = "21.2.0" ;
5+
6+ export default ( ) : Rule => async ( host : Tree , context : SchematicContext ) => {
7+ context . logger . info (
8+ `Applying migration for Ignite UI for Angular to version ${ version } ` ,
9+ ) ;
10+ const update = new UpdateChanges ( __dirname , host , context ) ;
11+ update . applyChanges ( ) ;
12+ } ;
You can’t perform that action at this time.
0 commit comments