Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@
"version": "20.0.6",
"description": "Updates Ignite UI for Angular from v20.0.2 to v20.0.6",
"factory": "./update-20_0_6"
},
"migration-49": {
"version": "20.1.0",
"description": "Updates Ignite UI for Angular from v20.0.6 to v20.1.0",
"factory": "./update-20_1_0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "../../common/schema/theme-changes.schema.json",
"changes": [
{
"name": "$filtering-background-and",
"remove": true,
"owner": "grid-theme",
"type": "property"
},
{
"name": "$filtering-background-and--focus",
"remove": true,
"owner": "grid-theme",
"type": "property"
},
{
"name": "$filtering-background-or",
"remove": true,
"owner": "grid-theme",
"type": "property"
},
{
"name": "$filtering-background-or--focus",
"remove": true,
"owner": "grid-theme",
"type": "property"
}
]
}
43 changes: 43 additions & 0 deletions projects/igniteui-angular/migrations/update-20_1_0/index.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import * as path from 'path';

import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
import { setupTestTree } from '../common/setup.spec';

const version = '20.1.0';

describe(`Update to ${version}`, () => {
let appTree: UnitTestTree;
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));

beforeEach(() => {
appTree = setupTestTree();
});

const migrationName = 'migration-49';

it('should remove properties related to the advanced filtering from the grid theme', async () => {
const testFilePath = `/testSrc/appPrefix/component/test.component.scss`;

appTree.create(
testFilePath,
`$my-input-group-theme: grid-theme(
$filtering-row-background: #ccc,
$filtering-background-and: red,
$filtering-background-and--focus: blue,
$filtering-background-or: yellow,
$filtering-background-or--focus: green
);`
);

const tree = await schematicRunner.runSchematic(migrationName, {}, appTree);

expect(tree.readContent(testFilePath)).toEqual(
`$my-input-group-theme: grid-theme(
$filtering-row-background: #ccc
);`
);
});
});



14 changes: 14 additions & 0 deletions projects/igniteui-angular/migrations/update-20_1_0/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type {
Rule,
SchematicContext,
Tree
} from '@angular-devkit/schematics';
import { UpdateChanges } from '../common/UpdateChanges';

const version = '20.1.0';

export default (): Rule => async (host: Tree, context: SchematicContext) => {
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
const update = new UpdateChanges(__dirname, host, context);
update.applyChanges();
};
Loading