Skip to content

Commit f152bc9

Browse files
authored
Merge branch 'master' into aahmedov/fix-select-control-flow-master
2 parents 39df8fa + 627a7a6 commit f152bc9

3 files changed

Lines changed: 67 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
};

0 commit comments

Comments
 (0)