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