devextreme-schematics 1.6.9 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +7 -7
- package/src/add-app-template/index_spec.js +8 -8
- package/src/add-app-template/index_spec.js.map +1 -1
- package/src/add-app-template/index_spec.ts +8 -8
- package/src/add-app-template/schema.json +3 -3
- package/src/add-layout/index.js +1 -8
- package/src/add-layout/index.js.map +1 -1
- package/src/add-layout/index.ts +1 -10
- package/src/add-layout/index_spec.js +24 -37
- package/src/add-layout/index_spec.js.map +1 -1
- package/src/add-layout/index_spec.ts +34 -57
- package/src/add-layout/schema.json +1 -1
- package/src/add-sample-views/index_spec.js +4 -4
- package/src/add-sample-views/index_spec.js.map +1 -1
- package/src/add-sample-views/index_spec.ts +4 -4
- package/src/add-view/index_spec.js +17 -17
- package/src/add-view/index_spec.js.map +1 -1
- package/src/add-view/index_spec.ts +17 -17
- package/src/install/index_spec.js +10 -11
- package/src/install/index_spec.js.map +1 -1
- package/src/install/index_spec.ts +10 -11
- package/src/install/schema.json +1 -1
- package/src/utility/latest-versions.js +2 -2
- package/src/utility/latest-versions.ts +2 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "devextreme-schematics",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.7.1",
|
4
4
|
"description": "DevExtreme schematics",
|
5
5
|
"scripts": {
|
6
6
|
"build": "tsc -p tsconfig.json",
|
@@ -22,18 +22,18 @@
|
|
22
22
|
],
|
23
23
|
"schematics": "./src/collection.json",
|
24
24
|
"dependencies": {
|
25
|
-
"@angular-devkit/core": "^
|
26
|
-
"@angular-devkit/schematics": "^
|
27
|
-
"@schematics/angular": "^
|
25
|
+
"@angular-devkit/core": "^16.2.10",
|
26
|
+
"@angular-devkit/schematics": "^16.2.10",
|
27
|
+
"@schematics/angular": "^16.2.10"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
30
|
"@types/jasmine": "~3.10.18",
|
31
|
-
"@types/node": "ts4.
|
31
|
+
"@types/node": "ts4.9",
|
32
32
|
"@types/semver": "^7.5.7",
|
33
33
|
"jasmine": "^2.99.0",
|
34
34
|
"rxjs": "^6.6.7",
|
35
35
|
"tslint": "^5.20.1",
|
36
|
-
"typescript": "^4.3
|
36
|
+
"typescript": "^4.9.3"
|
37
37
|
},
|
38
|
-
"gitHead": "
|
38
|
+
"gitHead": "faa2afd612b7677412d18ca0b8330b1076f4ccd8"
|
39
39
|
}
|
@@ -30,29 +30,29 @@ const angularSchematicsCollection = require.resolve('../../node_modules/@schemat
|
|
30
30
|
const schematicRunner = new testing_1.SchematicTestRunner('@schematics/angular', angularSchematicsCollection);
|
31
31
|
let appTree;
|
32
32
|
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
33
|
-
appTree = yield schematicRunner.
|
34
|
-
appTree = yield schematicRunner.
|
33
|
+
appTree = yield schematicRunner.runSchematic('workspace', workspaceOptions);
|
34
|
+
appTree = yield schematicRunner.runSchematic('application', appOptions, appTree);
|
35
35
|
}));
|
36
36
|
describe('add-app-template', () => {
|
37
37
|
it('should add DevExtreme', () => __awaiter(void 0, void 0, void 0, function* () {
|
38
38
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
39
|
-
const tree = yield runner.
|
39
|
+
const tree = yield runner.runSchematic('add-app-template', {}, appTree);
|
40
40
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
41
41
|
expect('devextreme' in packageConfig.dependencies).toBe(true);
|
42
42
|
}));
|
43
43
|
it('should consider the `project` option', () => __awaiter(void 0, void 0, void 0, function* () {
|
44
|
-
appTree = yield schematicRunner.
|
44
|
+
appTree = yield schematicRunner.runSchematic('application', {
|
45
45
|
name: 'testApp2',
|
46
46
|
inlineStyle: false,
|
47
47
|
inlineTemplate: false,
|
48
48
|
routing: true,
|
49
49
|
style: 'scss',
|
50
50
|
projectRoot: 'projects/testApp2'
|
51
|
-
}, appTree)
|
51
|
+
}, appTree);
|
52
52
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
53
|
-
const tree = yield runner.
|
53
|
+
const tree = yield runner.runSchematic('add-app-template', {
|
54
54
|
project: 'testApp2'
|
55
|
-
}, appTree)
|
55
|
+
}, appTree);
|
56
56
|
expect(tree.files)
|
57
57
|
.toContain('/devextreme.json');
|
58
58
|
expect(tree.files)
|
@@ -62,7 +62,7 @@ describe('add-app-template', () => {
|
|
62
62
|
}));
|
63
63
|
it('should consider the `updateBudgets` option', () => __awaiter(void 0, void 0, void 0, function* () {
|
64
64
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
65
|
-
const tree = yield runner.
|
65
|
+
const tree = yield runner.runSchematic('add-app-template', { updateBudgets: true }, appTree);
|
66
66
|
const angularContent = JSON.parse(tree.readContent('/angular.json'));
|
67
67
|
const budgets = angularContent.projects.testApp.architect.build.configurations.production.budgets;
|
68
68
|
expect(budgets[0].maximumWarning).toEqual('4mb');
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gEAAuF;AAEvF,6BAA6B;AAE7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,MAAM,UAAU,GAAQ;IACtB,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,EAAE;IACf,WAAW,EAAE,KAAK;IAClB,cAAc,EAAE,KAAK;IACrB,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,KAAK;IAChB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,gBAAgB,GAAqB;IACzC,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,MAAM,2BAA2B,GAAG,OAAO,CAAC,OAAO,CAAC,wDAAwD,CAAC,CAAC;AAC9G,MAAM,eAAe,GAAG,IAAI,6BAAmB,CAAC,qBAAqB,EAAE,2BAA2B,CAAC,C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E,EAAE,OAAO,CAAC,CAAC;QAE7F,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC;QACrE,MAAM,OAAO,GAAG,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,OAAO,CAAC;QAElG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -25,33 +25,33 @@ const schematicRunner = new SchematicTestRunner('@schematics/angular', angularSc
|
|
25
25
|
let appTree: UnitTestTree;
|
26
26
|
|
27
27
|
beforeEach(async () => {
|
28
|
-
appTree = await schematicRunner.
|
29
|
-
appTree = await schematicRunner.
|
28
|
+
appTree = await schematicRunner.runSchematic('workspace', workspaceOptions);
|
29
|
+
appTree = await schematicRunner.runSchematic('application', appOptions, appTree);
|
30
30
|
});
|
31
31
|
|
32
32
|
describe('add-app-template', () => {
|
33
33
|
it('should add DevExtreme', async () => {
|
34
34
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
35
|
-
const tree = await runner.
|
35
|
+
const tree = await runner.runSchematic('add-app-template', { }, appTree);
|
36
36
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
37
37
|
|
38
38
|
expect('devextreme' in packageConfig.dependencies).toBe(true);
|
39
39
|
});
|
40
40
|
|
41
41
|
it('should consider the `project` option', async () => {
|
42
|
-
appTree = await schematicRunner.
|
42
|
+
appTree = await schematicRunner.runSchematic('application', {
|
43
43
|
name: 'testApp2',
|
44
44
|
inlineStyle: false,
|
45
45
|
inlineTemplate: false,
|
46
46
|
routing: true,
|
47
47
|
style: 'scss',
|
48
48
|
projectRoot: 'projects/testApp2'
|
49
|
-
}, appTree)
|
49
|
+
}, appTree);
|
50
50
|
|
51
51
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
52
|
-
const tree = await runner.
|
52
|
+
const tree = await runner.runSchematic('add-app-template', {
|
53
53
|
project: 'testApp2'
|
54
|
-
}, appTree)
|
54
|
+
}, appTree);
|
55
55
|
|
56
56
|
expect(tree.files)
|
57
57
|
.toContain('/devextreme.json');
|
@@ -63,7 +63,7 @@ describe('add-app-template', () => {
|
|
63
63
|
|
64
64
|
it('should consider the `updateBudgets` option', async () => {
|
65
65
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
66
|
-
const tree = await runner.
|
66
|
+
const tree = await runner.runSchematic('add-app-template', { updateBudgets: true }, appTree);
|
67
67
|
|
68
68
|
const angularContent = JSON.parse(tree.readContent('/angular.json'));
|
69
69
|
const budgets = angularContent.projects.testApp.architect.build.configurations.production.budgets;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
3
3
|
"$id": "SchematicsDevextremeAddAppTemplate",
|
4
|
-
"title": "Add a DevExtreme layout template to an
|
4
|
+
"title": "Add a DevExtreme layout template to an Angular application",
|
5
5
|
"type": "object",
|
6
6
|
"properties": {
|
7
7
|
"layout": {
|
@@ -39,11 +39,11 @@
|
|
39
39
|
"dxversion": {
|
40
40
|
"type": "string",
|
41
41
|
"description": "The DevExtreme version",
|
42
|
-
"default": "
|
42
|
+
"default": "24.1.4"
|
43
43
|
},
|
44
44
|
"globalNgCliVersion": {
|
45
45
|
"type":"string",
|
46
|
-
"default": "^
|
46
|
+
"default": "^16.2.0"
|
47
47
|
},
|
48
48
|
"empty": {
|
49
49
|
"type": "boolean",
|
package/src/add-layout/index.js
CHANGED
@@ -113,6 +113,7 @@ function updateAppModule(host, sourcePath) {
|
|
113
113
|
};
|
114
114
|
};
|
115
115
|
const rules = [
|
116
|
+
modifyFileRule(appModulePath, importSetter('DxHttpModule', 'devextreme-angular/http')),
|
116
117
|
modifyFileRule(appModulePath, importSetter('SideNavOuterToolbarModule', './layouts')),
|
117
118
|
modifyFileRule(appModulePath, importSetter('SideNavInnerToolbarModule', './layouts')),
|
118
119
|
modifyFileRule(appModulePath, importSetter('SingleCardModule', './layouts')),
|
@@ -219,8 +220,6 @@ const modifyRoutingModule = (host, routingModulePath) => {
|
|
219
220
|
};
|
220
221
|
function default_1(options) {
|
221
222
|
return (host) => __awaiter(this, void 0, void 0, function* () {
|
222
|
-
const ngConfig = host.read('./angular.json').toString();
|
223
|
-
const defaultProjectName = (0, modify_json_file_1.parseJson)(ngConfig).defaultProject;
|
224
223
|
const project = yield (0, project_1.getProjectName)(host, options.project);
|
225
224
|
const workspace = yield (0, workspace_1.getWorkspace)(host);
|
226
225
|
const ngProject = workspace.projects.get(project);
|
@@ -267,12 +266,6 @@ function default_1(options) {
|
|
267
266
|
context.addTask(new patch_1.PatchNodePackageInstallTask());
|
268
267
|
});
|
269
268
|
}
|
270
|
-
if (override) {
|
271
|
-
if (project === defaultProjectName) {
|
272
|
-
rules.push(modifyContentByTemplate('./', workspaceFilesSource, 'e2e/src/app.e2e-spec.ts', { title }));
|
273
|
-
rules.push(modifyContentByTemplate('./', workspaceFilesSource, 'e2e/src/app.po.ts'));
|
274
|
-
}
|
275
|
-
}
|
276
269
|
return (0, schematics_1.chain)(rules);
|
277
270
|
});
|
278
271
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAcoC;AAMpC,+CAA+C;AAE/C,+BAAsC;AAEtC,mCAAgC;AAEhC,gDAI6B;AAE7B,8CAE2B;AAE3B,8CAE4B;AAE5B,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2DAcoC;AAMpC,+CAA+C;AAE/C,+BAAsC;AAEtC,mCAAgC;AAEhC,gDAI6B;AAE7B,8CAE2B;AAE3B,8CAE4B;AAE5B,kEAEsC;AAEtC,2EAGkD;A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,CAAC;AACJ,CAAC;AAzDD,4BAyDC"}
|
package/src/add-layout/index.ts
CHANGED
@@ -40,7 +40,6 @@ import {
|
|
40
40
|
|
41
41
|
import {
|
42
42
|
modifyJSONFile,
|
43
|
-
parseJson
|
44
43
|
} from '../utility/modify-json-file';
|
45
44
|
|
46
45
|
import {
|
@@ -182,6 +181,7 @@ function updateAppModule(host: Tree, sourcePath: string) {
|
|
182
181
|
};
|
183
182
|
|
184
183
|
const rules = [
|
184
|
+
modifyFileRule(appModulePath, importSetter('DxHttpModule', 'devextreme-angular/http')),
|
185
185
|
modifyFileRule(appModulePath, importSetter('SideNavOuterToolbarModule', './layouts')),
|
186
186
|
modifyFileRule(appModulePath, importSetter('SideNavInnerToolbarModule', './layouts')),
|
187
187
|
modifyFileRule(appModulePath, importSetter('SingleCardModule', './layouts')),
|
@@ -318,8 +318,6 @@ const modifyRoutingModule = (host: Tree, routingModulePath: string) => {
|
|
318
318
|
|
319
319
|
export default function(options: any): Rule {
|
320
320
|
return async (host: Tree) => {
|
321
|
-
const ngConfig = host.read('./angular.json')!.toString();
|
322
|
-
const defaultProjectName = parseJson(ngConfig).defaultProject;
|
323
321
|
const project = await getProjectName(host, options.project);
|
324
322
|
const workspace = await getWorkspace(host);
|
325
323
|
const ngProject = workspace.projects.get(project);
|
@@ -373,13 +371,6 @@ export default function(options: any): Rule {
|
|
373
371
|
});
|
374
372
|
}
|
375
373
|
|
376
|
-
if (override) {
|
377
|
-
if (project === defaultProjectName) {
|
378
|
-
rules.push(modifyContentByTemplate('./', workspaceFilesSource, 'e2e/src/app.e2e-spec.ts', { title }));
|
379
|
-
rules.push(modifyContentByTemplate('./', workspaceFilesSource, 'e2e/src/app.po.ts'));
|
380
|
-
}
|
381
|
-
}
|
382
|
-
|
383
374
|
return chain(rules);
|
384
375
|
};
|
385
376
|
}
|
@@ -27,23 +27,23 @@ describe('layout', () => {
|
|
27
27
|
};
|
28
28
|
const workspaceOptions = {
|
29
29
|
name: 'workspace',
|
30
|
-
version: '
|
30
|
+
version: '16.0.0'
|
31
31
|
};
|
32
32
|
const options = {
|
33
33
|
layout: 'side-nav-outer-toolbar',
|
34
34
|
resolveConflicts: 'override',
|
35
|
-
globalNgCliVersion: '^
|
35
|
+
globalNgCliVersion: '^16.2.0'
|
36
36
|
};
|
37
37
|
const angularSchematicsCollection = require.resolve('../../node_modules/@schematics/angular/collection.json');
|
38
38
|
const schematicRunner = new testing_1.SchematicTestRunner('@schematics/angular', angularSchematicsCollection);
|
39
39
|
let appTree;
|
40
40
|
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
41
|
-
appTree = yield schematicRunner.
|
42
|
-
appTree = yield schematicRunner.
|
41
|
+
appTree = yield schematicRunner.runSchematic('workspace', workspaceOptions);
|
42
|
+
appTree = yield schematicRunner.runSchematic('application', appOptions, appTree);
|
43
43
|
}));
|
44
44
|
it('should add layout with override', () => __awaiter(void 0, void 0, void 0, function* () {
|
45
45
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
46
|
-
const tree = yield runner.
|
46
|
+
const tree = yield runner.runSchematic('add-layout', options, appTree);
|
47
47
|
expect(tree.files)
|
48
48
|
.toContain('/devextreme.json');
|
49
49
|
expect(tree.files)
|
@@ -86,6 +86,7 @@ describe('layout', () => {
|
|
86
86
|
expect(styles[1]).toBe('src/themes/generated/theme.base.css');
|
87
87
|
expect(styles[2]).toBe('src/themes/generated/theme.additional.css');
|
88
88
|
const moduleContent = tree.readContent('/src/app/app.module.ts');
|
89
|
+
expect(moduleContent).toContain('import { DxHttpModule }');
|
89
90
|
expect(moduleContent)
|
90
91
|
.toContain('import { SideNavOuterToolbarModule, SideNavInnerToolbarModule, SingleCardModule }');
|
91
92
|
expect(moduleContent)
|
@@ -97,10 +98,6 @@ describe('layout', () => {
|
|
97
98
|
'CreateAccountFormModule, ' +
|
98
99
|
'ChangePasswordFormModule, ' +
|
99
100
|
'LoginFormModule }');
|
100
|
-
const testContent = tree.readContent('/e2e/src/app.e2e-spec.ts');
|
101
|
-
expect(testContent).toMatch(/'Welcome to TestApp!'/);
|
102
|
-
const testUtilsContent = tree.readContent('/e2e/src/app.po.ts');
|
103
|
-
expect(testUtilsContent).toMatch(/'app-root .dx-drawer-content .dx-card p:nth-child\(2\)'/);
|
104
101
|
const appContent = tree.readContent('/src/app/app.component.ts');
|
105
102
|
expect(appContent).toContain('templateUrl: \'./app.component.html\',');
|
106
103
|
expect(appContent).toContain('styleUrls: [\'./app.component.scss\']');
|
@@ -111,7 +108,7 @@ describe('layout', () => {
|
|
111
108
|
}));
|
112
109
|
it('should add npm scripts', () => __awaiter(void 0, void 0, void 0, function* () {
|
113
110
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
114
|
-
const tree = yield runner.
|
111
|
+
const tree = yield runner.runSchematic('add-layout', options, appTree);
|
115
112
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
116
113
|
expect(packageConfig.scripts['build-themes']).toBe('devextreme build');
|
117
114
|
expect(packageConfig.scripts['postinstall']).toBe('npm run build-themes');
|
@@ -124,7 +121,7 @@ describe('layout', () => {
|
|
124
121
|
version: '7.0.0'
|
125
122
|
});
|
126
123
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
127
|
-
const tree = yield runner.
|
124
|
+
const tree = yield runner.runSchematic('add-layout', options, appTree);
|
128
125
|
const navigationMenu = tree.readContent('/src/app/shared/components/side-navigation-menu/side-navigation-menu.component.ts');
|
129
126
|
expect(navigationMenu).toContain('@ViewChild(DxTreeViewComponent, { static: true })');
|
130
127
|
}));
|
@@ -136,7 +133,7 @@ describe('layout', () => {
|
|
136
133
|
return config;
|
137
134
|
});
|
138
135
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
139
|
-
const tree = yield runner.
|
136
|
+
const tree = yield runner.runSchematic('add-layout', options, appTree);
|
140
137
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
141
138
|
expect(packageConfig.scripts['origin-build-themes']).toBe('prev value 1');
|
142
139
|
expect(packageConfig.scripts['origin-postinstall']).toBe('prev value 2');
|
@@ -145,19 +142,19 @@ describe('layout', () => {
|
|
145
142
|
}));
|
146
143
|
it('should add angular/cdk dependency', () => __awaiter(void 0, void 0, void 0, function* () {
|
147
144
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
148
|
-
const tree = yield runner.
|
145
|
+
const tree = yield runner.runSchematic('add-layout', options, appTree);
|
149
146
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
150
147
|
expect(packageConfig.dependencies['@angular/cdk']).toBeDefined();
|
151
148
|
}));
|
152
149
|
it('should choose angular/cdk version such as angular/cli', () => __awaiter(void 0, void 0, void 0, function* () {
|
153
150
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
154
|
-
const tree = yield runner.
|
151
|
+
const tree = yield runner.runSchematic('add-layout', options, appTree);
|
155
152
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
156
|
-
expect(packageConfig.dependencies['@angular/cdk']).toBe('~
|
153
|
+
expect(packageConfig.dependencies['@angular/cdk']).toBe('~16.2.0');
|
157
154
|
}));
|
158
155
|
it('should update budgets if updateBudgets option is true', () => __awaiter(void 0, void 0, void 0, function* () {
|
159
156
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
160
|
-
const tree = yield runner.
|
157
|
+
const tree = yield runner.runSchematic('add-layout', Object.assign(Object.assign({}, options), { updateBudgets: true }), appTree);
|
161
158
|
const angularContent = JSON.parse(tree.readContent('/angular.json'));
|
162
159
|
const budgets = angularContent.projects.testApp.architect.build.configurations.production.budgets;
|
163
160
|
expect(budgets.length).toBe(2);
|
@@ -169,7 +166,7 @@ describe('layout', () => {
|
|
169
166
|
}));
|
170
167
|
it('should not update budgets if updateBudgets option is not defined or false', () => __awaiter(void 0, void 0, void 0, function* () {
|
171
168
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
172
|
-
const tree = yield runner.
|
169
|
+
const tree = yield runner.runSchematic('add-layout', options, appTree);
|
173
170
|
const angularContent = JSON.parse(tree.readContent('/angular.json'));
|
174
171
|
const budgets = angularContent.projects.testApp.architect.build.configurations.production.budgets;
|
175
172
|
const defaultBudget = {
|
@@ -183,7 +180,7 @@ describe('layout', () => {
|
|
183
180
|
it('should add layout without override', () => __awaiter(void 0, void 0, void 0, function* () {
|
184
181
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
185
182
|
options.resolveConflicts = 'createNew';
|
186
|
-
const tree = yield runner.
|
183
|
+
const tree = yield runner.runSchematic('add-layout', options, appTree);
|
187
184
|
expect(tree.files).toContain('/src/app/app1.component.ts');
|
188
185
|
const componentContent = tree.readContent('/src/app/app1.component.html');
|
189
186
|
expect(componentContent).toContain('app-side-nav-outer-toolbar title="{{appInfo.title}}"');
|
@@ -198,11 +195,11 @@ describe('layout', () => {
|
|
198
195
|
expect(appInfo).toContain(`return 'TestApp';`);
|
199
196
|
}));
|
200
197
|
it('should add routing to layout', () => __awaiter(void 0, void 0, void 0, function* () {
|
201
|
-
let newAppTree = yield schematicRunner.
|
198
|
+
let newAppTree = yield schematicRunner.runSchematic('workspace', workspaceOptions);
|
202
199
|
appOptions.routing = false;
|
203
|
-
newAppTree = yield schematicRunner.
|
200
|
+
newAppTree = yield schematicRunner.runSchematic('application', appOptions, newAppTree);
|
204
201
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
205
|
-
const tree = yield runner.
|
202
|
+
const tree = yield runner.runSchematic('add-layout', options, appTree);
|
206
203
|
expect(tree.files).toContain('/src/app/app-routing.module.ts');
|
207
204
|
const moduleContent = tree.readContent('/src/app/app-routing.module.ts');
|
208
205
|
expect(moduleContent)
|
@@ -218,39 +215,29 @@ describe('layout', () => {
|
|
218
215
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
219
216
|
options.layout = 'side-nav-inner-toolbar';
|
220
217
|
options.resolveConflicts = 'override';
|
221
|
-
const tree = yield runner.
|
218
|
+
const tree = yield runner.runSchematic('add-layout', options, appTree);
|
222
219
|
const content = tree.readContent('/src/app/app.component.html');
|
223
220
|
expect(content).toContain('app-side-nav-inner-toolbar title="{{appInfo.title}}"');
|
224
221
|
}));
|
225
222
|
it('should consider the `project` option', () => __awaiter(void 0, void 0, void 0, function* () {
|
226
|
-
appTree = yield schematicRunner.
|
223
|
+
appTree = yield schematicRunner.runSchematic('application', Object.assign(Object.assign({}, appOptions), { name: 'testApp2', projectRoot: 'projects/testApp2' }), appTree);
|
227
224
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
228
|
-
const tree = yield runner.
|
225
|
+
const tree = yield runner.runSchematic('add-layout', Object.assign(Object.assign({}, options), { project: 'testApp2' }), appTree);
|
229
226
|
expect(tree.files)
|
230
227
|
.toContain('/devextreme.json');
|
231
228
|
expect(tree.files)
|
232
229
|
.toContain('/projects/testApp2/src/themes/metadata.base.json');
|
233
230
|
}));
|
234
231
|
it('should merge build commands in devextreme.json file', () => __awaiter(void 0, void 0, void 0, function* () {
|
235
|
-
appTree = yield schematicRunner.
|
232
|
+
appTree = yield schematicRunner.runSchematic('application', Object.assign(Object.assign({}, appOptions), { name: 'testApp2', prefix: 'app2', projectRoot: 'projects/testApp2' }), appTree);
|
236
233
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
237
|
-
let tree = yield runner.
|
238
|
-
tree = yield runner.
|
234
|
+
let tree = yield runner.runSchematic('add-layout', options, appTree);
|
235
|
+
tree = yield runner.runSchematic('add-layout', Object.assign(Object.assign({}, options), { project: 'testApp2' }), appTree);
|
239
236
|
const appContent = tree.readContent('projects/testApp2/src/app/app.component.ts');
|
240
237
|
expect(appContent).toContain('selector: \'app2-root\',');
|
241
238
|
const content = tree.readContent('/devextreme.json');
|
242
239
|
expect(content).toContain('"inputFile": "src/themes/metadata.base.json",');
|
243
240
|
expect(content).toContain('"inputFile": "projects/testApp2/src/themes/metadata.base.json",');
|
244
241
|
}));
|
245
|
-
it('should add e2e tests only for default project', () => __awaiter(void 0, void 0, void 0, function* () {
|
246
|
-
appTree = yield schematicRunner.runSchematicAsync('application', Object.assign(Object.assign({}, appOptions), { name: 'testApp2', projectRoot: 'projects/testApp2' }), appTree).toPromise();
|
247
|
-
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
248
|
-
let tree = yield runner.runSchematicAsync('add-layout', options, appTree).toPromise();
|
249
|
-
tree = yield runner.runSchematicAsync('add-layout', Object.assign(Object.assign({}, options), { project: 'testApp2' }), appTree).toPromise();
|
250
|
-
const testContent = tree.readContent('/e2e/src/app.e2e-spec.ts');
|
251
|
-
expect(testContent).toContain('Welcome to TestApp!');
|
252
|
-
const testUtilsContent = tree.readContent('/e2e/src/app.po.ts');
|
253
|
-
expect(testUtilsContent).toMatch(/'app-root .dx-drawer-content .dx-card p:nth-child\(2\)'/);
|
254
|
-
}));
|
255
242
|
});
|
256
243
|
//# sourceMappingURL=index_spec.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gEAAuF;AAEvF,2EAIkD;AAClD,6BAA6B;AAE7B,kEAA6D;AAE7D,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACtB,MAAM,UAAU,GAAQ;QACtB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,KAAK;QAChB,eAAe,EAAE,KAAK;KACvB,CAAC;IAEF,MAAM,gBAAgB,GAAqB;QACzC,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,OAAO;KACjB,CAAC;IAEF,MAAM,OAAO,GAAQ;QACnB,MAAM,EAAE,wBAAwB;QAChC,g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IAAI,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACrE,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,YAAY,kCACxC,OAAO,KACV,OAAO,EAAE,UAAU,KAClB,OAAO,CAAC,CAAC;QAEZ,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,4CAA4C,CAAC,CAAC;QAClF,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAAC;QAEzD,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;QACrD,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,+CAA+C,CAAC,CAAC;QAC3E,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,iEAAiE,CAAC,CAAC;IAC/F,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -25,27 +25,30 @@ describe('layout', () => {
|
|
25
25
|
|
26
26
|
const workspaceOptions: WorkspaceOptions = {
|
27
27
|
name: 'workspace',
|
28
|
-
version: '
|
28
|
+
version: '16.0.0'
|
29
29
|
};
|
30
30
|
|
31
31
|
const options: any = {
|
32
32
|
layout: 'side-nav-outer-toolbar',
|
33
33
|
resolveConflicts: 'override',
|
34
|
-
globalNgCliVersion: '^
|
34
|
+
globalNgCliVersion: '^16.2.0'
|
35
35
|
};
|
36
36
|
|
37
37
|
const angularSchematicsCollection = require.resolve('../../node_modules/@schematics/angular/collection.json');
|
38
|
-
const schematicRunner = new SchematicTestRunner(
|
38
|
+
const schematicRunner = new SchematicTestRunner(
|
39
|
+
'@schematics/angular',
|
40
|
+
angularSchematicsCollection,
|
41
|
+
);
|
39
42
|
let appTree: UnitTestTree;
|
40
43
|
|
41
44
|
beforeEach(async () => {
|
42
|
-
appTree = await schematicRunner.
|
43
|
-
appTree = await schematicRunner.
|
45
|
+
appTree = await schematicRunner.runSchematic('workspace', workspaceOptions);
|
46
|
+
appTree = await schematicRunner.runSchematic('application', appOptions, appTree);
|
44
47
|
});
|
45
48
|
|
46
49
|
it('should add layout with override', async () => {
|
47
50
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
48
|
-
const tree = await runner.
|
51
|
+
const tree = await runner.runSchematic('add-layout', options, appTree);
|
49
52
|
|
50
53
|
expect(tree.files)
|
51
54
|
.toContain('/devextreme.json');
|
@@ -96,6 +99,7 @@ describe('layout', () => {
|
|
96
99
|
expect(styles[2]).toBe('src/themes/generated/theme.additional.css');
|
97
100
|
|
98
101
|
const moduleContent = tree.readContent('/src/app/app.module.ts');
|
102
|
+
expect(moduleContent).toContain('import { DxHttpModule }');
|
99
103
|
expect(moduleContent)
|
100
104
|
.toContain('import { SideNavOuterToolbarModule, SideNavInnerToolbarModule, SingleCardModule }');
|
101
105
|
expect(moduleContent)
|
@@ -108,12 +112,6 @@ describe('layout', () => {
|
|
108
112
|
'ChangePasswordFormModule, ' +
|
109
113
|
'LoginFormModule }');
|
110
114
|
|
111
|
-
const testContent = tree.readContent('/e2e/src/app.e2e-spec.ts');
|
112
|
-
expect(testContent).toMatch(/'Welcome to TestApp!'/);
|
113
|
-
|
114
|
-
const testUtilsContent = tree.readContent('/e2e/src/app.po.ts');
|
115
|
-
expect(testUtilsContent).toMatch(/'app-root .dx-drawer-content .dx-card p:nth-child\(2\)'/);
|
116
|
-
|
117
115
|
const appContent = tree.readContent('/src/app/app.component.ts');
|
118
116
|
expect(appContent).toContain('templateUrl: \'./app.component.html\',');
|
119
117
|
expect(appContent).toContain('styleUrls: [\'./app.component.scss\']');
|
@@ -127,7 +125,7 @@ describe('layout', () => {
|
|
127
125
|
|
128
126
|
it('should add npm scripts', async () => {
|
129
127
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
130
|
-
const tree = await runner.
|
128
|
+
const tree = await runner.runSchematic('add-layout', options, appTree);
|
131
129
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
132
130
|
expect(packageConfig.scripts['build-themes']).toBe('devextreme build');
|
133
131
|
expect(packageConfig.scripts['postinstall']).toBe('npm run build-themes');
|
@@ -142,7 +140,7 @@ describe('layout', () => {
|
|
142
140
|
});
|
143
141
|
|
144
142
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
145
|
-
const tree = await runner.
|
143
|
+
const tree = await runner.runSchematic('add-layout', options, appTree);
|
146
144
|
const navigationMenu = tree.readContent(
|
147
145
|
'/src/app/shared/components/side-navigation-menu/side-navigation-menu.component.ts');
|
148
146
|
|
@@ -160,7 +158,7 @@ describe('layout', () => {
|
|
160
158
|
});
|
161
159
|
|
162
160
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
163
|
-
const tree = await runner.
|
161
|
+
const tree = await runner.runSchematic('add-layout', options, appTree);
|
164
162
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
165
163
|
expect(packageConfig.scripts['origin-build-themes']).toBe('prev value 1');
|
166
164
|
expect(packageConfig.scripts['origin-postinstall']).toBe('prev value 2');
|
@@ -170,7 +168,7 @@ describe('layout', () => {
|
|
170
168
|
|
171
169
|
it('should add angular/cdk dependency', async () => {
|
172
170
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
173
|
-
const tree = await runner.
|
171
|
+
const tree = await runner.runSchematic('add-layout', options, appTree);
|
174
172
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
175
173
|
|
176
174
|
expect(packageConfig.dependencies['@angular/cdk']).toBeDefined();
|
@@ -178,18 +176,18 @@ describe('layout', () => {
|
|
178
176
|
|
179
177
|
it('should choose angular/cdk version such as angular/cli', async () => {
|
180
178
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
181
|
-
const tree = await runner.
|
179
|
+
const tree = await runner.runSchematic('add-layout', options, appTree);
|
182
180
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
183
181
|
|
184
|
-
expect(packageConfig.dependencies['@angular/cdk']).toBe('~
|
182
|
+
expect(packageConfig.dependencies['@angular/cdk']).toBe('~16.2.0');
|
185
183
|
});
|
186
184
|
|
187
185
|
it('should update budgets if updateBudgets option is true', async () => {
|
188
186
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
189
|
-
const tree = await runner.
|
187
|
+
const tree = await runner.runSchematic('add-layout', {
|
190
188
|
...options,
|
191
189
|
updateBudgets: true
|
192
|
-
}, appTree)
|
190
|
+
}, appTree);
|
193
191
|
|
194
192
|
const angularContent = JSON.parse(tree.readContent('/angular.json'));
|
195
193
|
const budgets = angularContent.projects.testApp.architect.build.configurations.production.budgets;
|
@@ -204,7 +202,7 @@ describe('layout', () => {
|
|
204
202
|
|
205
203
|
it('should not update budgets if updateBudgets option is not defined or false', async () => {
|
206
204
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
207
|
-
const tree = await runner.
|
205
|
+
const tree = await runner.runSchematic('add-layout', options, appTree);
|
208
206
|
|
209
207
|
const angularContent = JSON.parse(tree.readContent('/angular.json'));
|
210
208
|
const budgets = angularContent.projects.testApp.architect.build.configurations.production.budgets;
|
@@ -222,7 +220,7 @@ describe('layout', () => {
|
|
222
220
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
223
221
|
|
224
222
|
options.resolveConflicts = 'createNew';
|
225
|
-
const tree = await runner.
|
223
|
+
const tree = await runner.runSchematic('add-layout', options, appTree);
|
226
224
|
|
227
225
|
expect(tree.files).toContain('/src/app/app1.component.ts');
|
228
226
|
|
@@ -243,14 +241,14 @@ describe('layout', () => {
|
|
243
241
|
});
|
244
242
|
|
245
243
|
it('should add routing to layout', async () => {
|
246
|
-
let newAppTree = await schematicRunner.
|
244
|
+
let newAppTree = await schematicRunner.runSchematic('workspace', workspaceOptions);
|
247
245
|
|
248
246
|
appOptions.routing = false;
|
249
|
-
newAppTree = await schematicRunner.
|
250
|
-
'application', appOptions, newAppTree)
|
247
|
+
newAppTree = await schematicRunner.runSchematic(
|
248
|
+
'application', appOptions, newAppTree);
|
251
249
|
|
252
250
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
253
|
-
const tree = await runner.
|
251
|
+
const tree = await runner.runSchematic('add-layout', options, appTree);
|
254
252
|
|
255
253
|
expect(tree.files).toContain('/src/app/app-routing.module.ts');
|
256
254
|
const moduleContent = tree.readContent('/src/app/app-routing.module.ts');
|
@@ -269,24 +267,24 @@ describe('layout', () => {
|
|
269
267
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
270
268
|
options.layout = 'side-nav-inner-toolbar';
|
271
269
|
options.resolveConflicts = 'override';
|
272
|
-
const tree = await runner.
|
270
|
+
const tree = await runner.runSchematic('add-layout', options, appTree);
|
273
271
|
const content = tree.readContent('/src/app/app.component.html');
|
274
272
|
|
275
273
|
expect(content).toContain('app-side-nav-inner-toolbar title="{{appInfo.title}}"');
|
276
274
|
});
|
277
275
|
|
278
276
|
it('should consider the `project` option', async () => {
|
279
|
-
appTree = await schematicRunner.
|
277
|
+
appTree = await schematicRunner.runSchematic('application', {
|
280
278
|
...appOptions,
|
281
279
|
name: 'testApp2',
|
282
280
|
projectRoot: 'projects/testApp2'
|
283
|
-
}, appTree)
|
281
|
+
}, appTree);
|
284
282
|
|
285
283
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
286
|
-
const tree = await runner.
|
284
|
+
const tree = await runner.runSchematic('add-layout', {
|
287
285
|
...options,
|
288
286
|
project: 'testApp2'
|
289
|
-
}, appTree)
|
287
|
+
}, appTree);
|
290
288
|
|
291
289
|
expect(tree.files)
|
292
290
|
.toContain('/devextreme.json');
|
@@ -295,19 +293,19 @@ describe('layout', () => {
|
|
295
293
|
});
|
296
294
|
|
297
295
|
it('should merge build commands in devextreme.json file', async () => {
|
298
|
-
appTree = await schematicRunner.
|
296
|
+
appTree = await schematicRunner.runSchematic('application', {
|
299
297
|
...appOptions,
|
300
298
|
name: 'testApp2',
|
301
299
|
prefix: 'app2',
|
302
300
|
projectRoot: 'projects/testApp2'
|
303
|
-
}, appTree)
|
301
|
+
}, appTree);
|
304
302
|
|
305
303
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
306
|
-
let tree = await runner.
|
307
|
-
tree = await runner.
|
304
|
+
let tree = await runner.runSchematic('add-layout', options, appTree);
|
305
|
+
tree = await runner.runSchematic('add-layout', {
|
308
306
|
...options,
|
309
307
|
project: 'testApp2'
|
310
|
-
}, appTree)
|
308
|
+
}, appTree);
|
311
309
|
|
312
310
|
const appContent = tree.readContent('projects/testApp2/src/app/app.component.ts');
|
313
311
|
expect(appContent).toContain('selector: \'app2-root\',');
|
@@ -316,25 +314,4 @@ describe('layout', () => {
|
|
316
314
|
expect(content).toContain('"inputFile": "src/themes/metadata.base.json",');
|
317
315
|
expect(content).toContain('"inputFile": "projects/testApp2/src/themes/metadata.base.json",');
|
318
316
|
});
|
319
|
-
|
320
|
-
it('should add e2e tests only for default project', async () => {
|
321
|
-
appTree = await schematicRunner.runSchematicAsync('application', {
|
322
|
-
...appOptions,
|
323
|
-
name: 'testApp2',
|
324
|
-
projectRoot: 'projects/testApp2'
|
325
|
-
}, appTree).toPromise();
|
326
|
-
|
327
|
-
const runner = new SchematicTestRunner('schematics', collectionPath);
|
328
|
-
let tree = await runner.runSchematicAsync('add-layout', options, appTree).toPromise();
|
329
|
-
tree = await runner.runSchematicAsync('add-layout', {
|
330
|
-
...options,
|
331
|
-
project: 'testApp2'
|
332
|
-
}, appTree).toPromise();
|
333
|
-
|
334
|
-
const testContent = tree.readContent('/e2e/src/app.e2e-spec.ts');
|
335
|
-
expect(testContent).toContain('Welcome to TestApp!');
|
336
|
-
|
337
|
-
const testUtilsContent = tree.readContent('/e2e/src/app.po.ts');
|
338
|
-
expect(testUtilsContent).toMatch(/'app-root .dx-drawer-content .dx-card p:nth-child\(2\)'/);
|
339
|
-
});
|
340
317
|
});
|
@@ -34,13 +34,13 @@ describe('sample views', () => {
|
|
34
34
|
const schematicRunner = new testing_1.SchematicTestRunner('@schematics/angular', angularSchematicsCollection);
|
35
35
|
let appTree;
|
36
36
|
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
37
|
-
appTree = yield schematicRunner.
|
38
|
-
appTree = yield schematicRunner.
|
37
|
+
appTree = yield schematicRunner.runSchematic('workspace', workspaceOptions);
|
38
|
+
appTree = yield schematicRunner.runSchematic('application', appOptions, appTree);
|
39
39
|
}));
|
40
40
|
it('should add sample views', () => __awaiter(void 0, void 0, void 0, function* () {
|
41
41
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
42
|
-
let tree = yield runner.
|
43
|
-
tree = yield runner.
|
42
|
+
let tree = yield runner.runSchematic('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree);
|
43
|
+
tree = yield runner.runSchematic('add-sample-views', sampleViewsOptions, tree);
|
44
44
|
const moduleContent = tree.readContent('/src/app/app-routing.module.ts');
|
45
45
|
expect(moduleContent).toMatch(/component: HomeComponent/);
|
46
46
|
expect(moduleContent).toMatch(/path: 'home'/);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gEAAuF;AAEvF,6BAA6B;AAE7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,MAAM,UAAU,GAAQ;QACtB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,KAAK;QAChB,eAAe,EAAE,KAAK;KACvB,CAAC;IAEF,MAAM,gBAAgB,GAAqB;QACzC,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,OAAO;KACjB,CAAC;IAEF,MAAM,kBAAkB,GAAQ;QAC9B,OAAO,EAAE,SAAS;KACnB,CAAC;IAEF,MAAM,2BAA2B,GAAG,O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,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,GAAS,EAAE;QACvC,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,IAAI,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,wBAAwB,EAAE,EAAE,OAAO,CAAC,CAAC;QAClG,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;QAE/E,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC,gCAAgC,CAAC,CAAC;QAEzE,MAAM,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;QAC1D,MAAM,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAE9C,MAAM,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;QAChE,MAAM,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;QAEtE,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;QACzE,MAAM,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAClD,MAAM,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;GAoBrC,CAAC,CAAC;IACH,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -30,14 +30,14 @@ describe('sample views', () => {
|
|
30
30
|
let appTree: UnitTestTree;
|
31
31
|
|
32
32
|
beforeEach(async () => {
|
33
|
-
appTree = await schematicRunner.
|
34
|
-
appTree = await schematicRunner.
|
33
|
+
appTree = await schematicRunner.runSchematic('workspace', workspaceOptions);
|
34
|
+
appTree = await schematicRunner.runSchematic('application', appOptions, appTree);
|
35
35
|
});
|
36
36
|
|
37
37
|
it('should add sample views', async () => {
|
38
38
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
39
|
-
let tree = await runner.
|
40
|
-
tree = await runner.
|
39
|
+
let tree = await runner.runSchematic('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree);
|
40
|
+
tree = await runner.runSchematic('add-sample-views', sampleViewsOptions, tree);
|
41
41
|
|
42
42
|
const moduleContent = tree.readContent('/src/app/app-routing.module.ts');
|
43
43
|
|
@@ -42,13 +42,13 @@ describe('view', () => {
|
|
42
42
|
const schematicRunner = new testing_1.SchematicTestRunner('@schematics/angular', angularSchematicsCollection);
|
43
43
|
let appTree;
|
44
44
|
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
45
|
-
appTree = yield schematicRunner.
|
46
|
-
appTree = yield schematicRunner.
|
45
|
+
appTree = yield schematicRunner.runSchematic('workspace', workspaceOptions);
|
46
|
+
appTree = yield schematicRunner.runSchematic('application', appOptions, appTree);
|
47
47
|
}));
|
48
48
|
it('should create new view', () => __awaiter(void 0, void 0, void 0, function* () {
|
49
49
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
50
|
-
let tree = yield runner.
|
51
|
-
tree = yield runner.
|
50
|
+
let tree = yield runner.runSchematic('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree);
|
51
|
+
tree = yield runner.runSchematic('add-view', componentOptions, appTree);
|
52
52
|
expect(tree.files).toContain('/src/app/pages/test/test.component.ts');
|
53
53
|
expect(tree.files).toContain('/src/app/pages/test/test.component.html');
|
54
54
|
const content = tree.readContent('/src/app/pages/test/test.component.html');
|
@@ -57,9 +57,9 @@ describe('view', () => {
|
|
57
57
|
it('should add view to default routing module', () => __awaiter(void 0, void 0, void 0, function* () {
|
58
58
|
const options = Object.assign(Object.assign({}, componentOptions), { addRoute: true });
|
59
59
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
60
|
-
let tree = yield runner.
|
61
|
-
tree = yield runner.
|
62
|
-
tree = yield runner.
|
60
|
+
let tree = yield runner.runSchematic('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree);
|
61
|
+
tree = yield runner.runSchematic('add-view', options, tree);
|
62
|
+
tree = yield runner.runSchematic('add-view', Object.assign(Object.assign({}, options), { name: 'test2' }), tree);
|
63
63
|
const moduleContent = tree.readContent('/src/app/app-routing.module.ts');
|
64
64
|
expect(moduleContent).toContain(`const routes: Routes = [
|
65
65
|
{
|
@@ -86,17 +86,17 @@ describe('view', () => {
|
|
86
86
|
it('should add view to other routing module', () => __awaiter(void 0, void 0, void 0, function* () {
|
87
87
|
const options = Object.assign(Object.assign({}, componentOptions), { addRoute: true, module: 'test/test-routing' });
|
88
88
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
89
|
-
let tree = yield runner.
|
89
|
+
let tree = yield runner.runExternalSchematic('@schematics/angular', 'module', {
|
90
90
|
name: 'test',
|
91
91
|
routing: true,
|
92
92
|
project: 'testApp'
|
93
|
-
}, appTree)
|
94
|
-
tree = yield runner.
|
93
|
+
}, appTree);
|
94
|
+
tree = yield runner.runSchematic('add-layout', {
|
95
95
|
layout: 'side-nav-outer-toolbar',
|
96
96
|
project: 'testApp',
|
97
97
|
name: 'test'
|
98
|
-
}, tree)
|
99
|
-
tree = yield runner.
|
98
|
+
}, tree);
|
99
|
+
tree = yield runner.runSchematic('add-view', options, tree);
|
100
100
|
const moduleContent = tree.readContent('/src/app/test/test-routing.module.ts');
|
101
101
|
expect(moduleContent).toMatch(/component: TestComponent/);
|
102
102
|
expect(moduleContent).toMatch(/path: 'pages\/test'/);
|
@@ -104,11 +104,11 @@ describe('view', () => {
|
|
104
104
|
}));
|
105
105
|
it('should add view to navigation', () => __awaiter(void 0, void 0, void 0, function* () {
|
106
106
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
107
|
-
let tree = yield runner.
|
108
|
-
tree = yield runner.
|
107
|
+
let tree = yield runner.runSchematic('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree);
|
108
|
+
tree = yield runner.runSchematic('add-view', componentOptions, tree);
|
109
109
|
componentOptions.name = 'some test';
|
110
110
|
componentOptions.icon = 'home';
|
111
|
-
tree = yield runner.
|
111
|
+
tree = yield runner.runSchematic('add-view', componentOptions, tree);
|
112
112
|
const moduleContent = tree.readContent('/src/app/app-navigation.ts');
|
113
113
|
expect(moduleContent).toMatch(/text: 'Some Test'/);
|
114
114
|
expect(moduleContent).toMatch(/icon: 'home'/);
|
@@ -132,8 +132,8 @@ describe('view', () => {
|
|
132
132
|
it('should create new view with path', () => __awaiter(void 0, void 0, void 0, function* () {
|
133
133
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
134
134
|
componentOptions.name = 'folder/test';
|
135
|
-
let tree = yield runner.
|
136
|
-
tree = yield runner.
|
135
|
+
let tree = yield runner.runSchematic('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree);
|
136
|
+
tree = yield runner.runSchematic('add-view', componentOptions, appTree);
|
137
137
|
expect(tree.files).toContain('/src/app/folder/test/test.component.ts');
|
138
138
|
expect(tree.files).toContain('/src/app/folder/test/test.component.html');
|
139
139
|
}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gEAAuF;AAEvF,6BAA6B;AAE7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;IACpB,MAAM,UAAU,GAAQ;QACtB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,KAAK;QAChB,eAAe,EAAE,KAAK;KACvB,CAAC;IAEF,MAAM,gBAAgB,GAAqB;QACzC,IA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a,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAEhD,MAAM,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC;;;;;;;;;;;GAWjC,CAAC,CAAC;QACD,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,mDAAmD,CAAC,CAAC;QAC1F,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,2CAA2C,CAAC,CAAC;IAC3E,CAAC,CAAA,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,GAAS,EAAE;QAChD,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,gBAAgB,CAAC,IAAI,GAAG,aAAa,CAAC;QACtC,IAAI,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,wBAAwB,EAAE,EAAE,OAAO,CAAC,CAAC;QAClG,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAExE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,wCAAwC,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,0CAA0C,CAAC,CAAC;IAC3E,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -38,14 +38,14 @@ describe('view', () => {
|
|
38
38
|
let appTree: UnitTestTree;
|
39
39
|
|
40
40
|
beforeEach(async () => {
|
41
|
-
appTree = await schematicRunner.
|
42
|
-
appTree = await schematicRunner.
|
41
|
+
appTree = await schematicRunner.runSchematic('workspace', workspaceOptions);
|
42
|
+
appTree = await schematicRunner.runSchematic('application', appOptions, appTree);
|
43
43
|
});
|
44
44
|
|
45
45
|
it('should create new view', async () => {
|
46
46
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
47
|
-
let tree = await runner.
|
48
|
-
tree = await runner.
|
47
|
+
let tree = await runner.runSchematic('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree);
|
48
|
+
tree = await runner.runSchematic('add-view', componentOptions, appTree);
|
49
49
|
|
50
50
|
expect(tree.files).toContain('/src/app/pages/test/test.component.ts');
|
51
51
|
expect(tree.files).toContain('/src/app/pages/test/test.component.html');
|
@@ -59,9 +59,9 @@ describe('view', () => {
|
|
59
59
|
const options = { ...componentOptions, addRoute: true };
|
60
60
|
|
61
61
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
62
|
-
let tree = await runner.
|
63
|
-
tree = await runner.
|
64
|
-
tree = await runner.
|
62
|
+
let tree = await runner.runSchematic('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree);
|
63
|
+
tree = await runner.runSchematic('add-view', options, tree);
|
64
|
+
tree = await runner.runSchematic('add-view', { ...options, name: 'test2' }, tree);
|
65
65
|
const moduleContent = tree.readContent('/src/app/app-routing.module.ts');
|
66
66
|
|
67
67
|
expect(moduleContent).toContain(`const routes: Routes = [
|
@@ -91,18 +91,18 @@ describe('view', () => {
|
|
91
91
|
const options = { ...componentOptions, addRoute: true, module: 'test/test-routing' };
|
92
92
|
|
93
93
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
94
|
-
let tree = await runner.
|
94
|
+
let tree = await runner.runExternalSchematic('@schematics/angular', 'module', {
|
95
95
|
name: 'test',
|
96
96
|
routing: true,
|
97
97
|
project: 'testApp'
|
98
|
-
}, appTree)
|
98
|
+
}, appTree);
|
99
99
|
|
100
|
-
tree = await runner.
|
100
|
+
tree = await runner.runSchematic('add-layout', {
|
101
101
|
layout: 'side-nav-outer-toolbar',
|
102
102
|
project: 'testApp',
|
103
103
|
name: 'test'
|
104
|
-
}, tree)
|
105
|
-
tree = await runner.
|
104
|
+
}, tree);
|
105
|
+
tree = await runner.runSchematic('add-view', options, tree);
|
106
106
|
|
107
107
|
const moduleContent = tree.readContent('/src/app/test/test-routing.module.ts');
|
108
108
|
|
@@ -113,12 +113,12 @@ describe('view', () => {
|
|
113
113
|
|
114
114
|
it('should add view to navigation', async () => {
|
115
115
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
116
|
-
let tree = await runner.
|
117
|
-
tree = await runner.
|
116
|
+
let tree = await runner.runSchematic('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree);
|
117
|
+
tree = await runner.runSchematic('add-view', componentOptions, tree);
|
118
118
|
|
119
119
|
componentOptions.name = 'some test';
|
120
120
|
componentOptions.icon = 'home';
|
121
|
-
tree = await runner.
|
121
|
+
tree = await runner.runSchematic('add-view', componentOptions, tree);
|
122
122
|
|
123
123
|
const moduleContent = tree.readContent('/src/app/app-navigation.ts');
|
124
124
|
|
@@ -146,8 +146,8 @@ describe('view', () => {
|
|
146
146
|
it('should create new view with path', async () => {
|
147
147
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
148
148
|
componentOptions.name = 'folder/test';
|
149
|
-
let tree = await runner.
|
150
|
-
tree = await runner.
|
149
|
+
let tree = await runner.runSchematic('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree);
|
150
|
+
tree = await runner.runSchematic('add-view', componentOptions, appTree);
|
151
151
|
|
152
152
|
expect(tree.files).toContain('/src/app/folder/test/test.component.ts');
|
153
153
|
expect(tree.files).toContain('/src/app/folder/test/test.component.html');
|
@@ -27,19 +27,18 @@ describe('install', () => {
|
|
27
27
|
};
|
28
28
|
const workspaceOptions = {
|
29
29
|
name: 'workspace',
|
30
|
-
|
31
|
-
version: '12.0.0'
|
30
|
+
version: '16.0.0'
|
32
31
|
};
|
33
32
|
const angularSchematicsCollection = require.resolve('../../node_modules/@schematics/angular/collection.json');
|
34
33
|
const schematicRunner = new testing_1.SchematicTestRunner('@schematics/angular', angularSchematicsCollection);
|
35
34
|
let appTree;
|
36
35
|
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
37
|
-
appTree = yield schematicRunner.
|
38
|
-
appTree = yield schematicRunner.
|
36
|
+
appTree = yield schematicRunner.runSchematic('workspace', workspaceOptions);
|
37
|
+
appTree = yield schematicRunner.runSchematic('application', appOptions, appTree);
|
39
38
|
}));
|
40
39
|
it('should add devextreme dependency (default)', () => __awaiter(void 0, void 0, void 0, function* () {
|
41
40
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
42
|
-
const tree = yield runner.
|
41
|
+
const tree = yield runner.runSchematic('install', {}, appTree);
|
43
42
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
44
43
|
expect(packageConfig.dependencies['devextreme']).toBe(latest_versions_1.latestVersions['devextreme']);
|
45
44
|
expect(packageConfig.dependencies['devextreme-angular']).toBe(latest_versions_1.latestVersions['devextreme-angular']);
|
@@ -47,27 +46,27 @@ describe('install', () => {
|
|
47
46
|
}));
|
48
47
|
it('should add devextreme dependency (custom)', () => __awaiter(void 0, void 0, void 0, function* () {
|
49
48
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
50
|
-
const tree = yield runner.
|
49
|
+
const tree = yield runner.runSchematic('install', { dxversion: '18.2.5' }, appTree);
|
51
50
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
52
51
|
expect(packageConfig.dependencies.devextreme).toBe('18.2.5');
|
53
52
|
expect(packageConfig.devDependencies['devextreme-themebuilder']).toBe('18.2.5');
|
54
53
|
}));
|
55
54
|
it('should add devextreme cli devDependency', () => __awaiter(void 0, void 0, void 0, function* () {
|
56
55
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
57
|
-
const tree = yield runner.
|
56
|
+
const tree = yield runner.runSchematic('install', { dxversion: '18.2.5' }, appTree);
|
58
57
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
59
58
|
expect(packageConfig.devDependencies['devextreme-cli']).toBeDefined();
|
60
59
|
}));
|
61
60
|
it('should add devextreme styles', () => __awaiter(void 0, void 0, void 0, function* () {
|
62
61
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
63
|
-
const tree = yield runner.
|
62
|
+
const tree = yield runner.runSchematic('install', {}, appTree);
|
64
63
|
const angularConfig = JSON.parse(tree.readContent('angular.json'));
|
65
64
|
const styles = angularConfig['projects']['testApp']['architect']['build']['options']['styles'];
|
66
65
|
expect(styles[0]).toBe('node_modules/devextreme/dist/css/dx.light.css');
|
67
66
|
}));
|
68
67
|
it('should register jszip', () => __awaiter(void 0, void 0, void 0, function* () {
|
69
68
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
70
|
-
const tree = yield runner.
|
69
|
+
const tree = yield runner.runSchematic('install', {}, appTree);
|
71
70
|
const tsconfig = JSON.parse(tree.readContent('tsconfig.app.json'));
|
72
71
|
const jszip = tsconfig['compilerOptions']['paths']['jszip'];
|
73
72
|
expect(jszip[0]).toBe('./node_modules/jszip/dist/jszip.min.js');
|
@@ -83,9 +82,9 @@ describe('install', () => {
|
|
83
82
|
skipTests: false,
|
84
83
|
skipPackageJson: false
|
85
84
|
};
|
86
|
-
appTree = yield schematicRunner.
|
85
|
+
appTree = yield schematicRunner.runSchematic('application', secondAppOptions, appTree);
|
87
86
|
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
88
|
-
const tree = yield runner.
|
87
|
+
const tree = yield runner.runSchematic('install', { project: 'testApp2' }, appTree);
|
89
88
|
const angularConfig = JSON.parse(tree.readContent('angular.json'));
|
90
89
|
const styles = angularConfig['projects']['testApp2']['architect']['build']['options']['styles'];
|
91
90
|
expect(styles[0]).toBe('node_modules/devextreme/dist/css/dx.light.css');
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gEAAuF;AAEvF,6BAA6B;AAC7B,gEAA4D;AAE5D,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,8CAA8C;IAC9C,M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AC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC;QAExE,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzG,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -20,8 +20,7 @@ describe('install', () => {
|
|
20
20
|
|
21
21
|
const workspaceOptions: WorkspaceOptions = {
|
22
22
|
name: 'workspace',
|
23
|
-
|
24
|
-
version: '12.0.0'
|
23
|
+
version: '16.0.0'
|
25
24
|
};
|
26
25
|
|
27
26
|
const angularSchematicsCollection = require.resolve('../../node_modules/@schematics/angular/collection.json');
|
@@ -29,13 +28,13 @@ describe('install', () => {
|
|
29
28
|
let appTree: UnitTestTree;
|
30
29
|
|
31
30
|
beforeEach(async () => {
|
32
|
-
appTree = await schematicRunner.
|
33
|
-
appTree = await schematicRunner.
|
31
|
+
appTree = await schematicRunner.runSchematic('workspace', workspaceOptions);
|
32
|
+
appTree = await schematicRunner.runSchematic('application', appOptions, appTree);
|
34
33
|
});
|
35
34
|
|
36
35
|
it('should add devextreme dependency (default)', async () => {
|
37
36
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
38
|
-
const tree = await runner.
|
37
|
+
const tree = await runner.runSchematic('install', {}, appTree);
|
39
38
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
40
39
|
|
41
40
|
expect(packageConfig.dependencies['devextreme']).toBe(latestVersions['devextreme']);
|
@@ -45,7 +44,7 @@ describe('install', () => {
|
|
45
44
|
|
46
45
|
it('should add devextreme dependency (custom)', async () => {
|
47
46
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
48
|
-
const tree = await runner.
|
47
|
+
const tree = await runner.runSchematic('install', { dxversion: '18.2.5' }, appTree);
|
49
48
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
50
49
|
|
51
50
|
expect(packageConfig.dependencies.devextreme).toBe('18.2.5');
|
@@ -54,7 +53,7 @@ describe('install', () => {
|
|
54
53
|
|
55
54
|
it('should add devextreme cli devDependency', async () => {
|
56
55
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
57
|
-
const tree = await runner.
|
56
|
+
const tree = await runner.runSchematic('install', { dxversion: '18.2.5' }, appTree);
|
58
57
|
const packageConfig = JSON.parse(tree.readContent('package.json'));
|
59
58
|
|
60
59
|
expect(packageConfig.devDependencies['devextreme-cli']).toBeDefined();
|
@@ -62,7 +61,7 @@ describe('install', () => {
|
|
62
61
|
|
63
62
|
it('should add devextreme styles', async () => {
|
64
63
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
65
|
-
const tree = await runner.
|
64
|
+
const tree = await runner.runSchematic('install', {}, appTree);
|
66
65
|
const angularConfig = JSON.parse(tree.readContent('angular.json'));
|
67
66
|
const styles = angularConfig['projects']['testApp']['architect']['build']['options']['styles'];
|
68
67
|
|
@@ -71,7 +70,7 @@ describe('install', () => {
|
|
71
70
|
|
72
71
|
it('should register jszip', async () => {
|
73
72
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
74
|
-
const tree = await runner.
|
73
|
+
const tree = await runner.runSchematic('install', {}, appTree);
|
75
74
|
const tsconfig = JSON.parse(tree.readContent('tsconfig.app.json'));
|
76
75
|
const jszip = tsconfig['compilerOptions']['paths']['jszip'];
|
77
76
|
|
@@ -90,10 +89,10 @@ describe('install', () => {
|
|
90
89
|
skipPackageJson: false
|
91
90
|
};
|
92
91
|
|
93
|
-
appTree = await schematicRunner.
|
92
|
+
appTree = await schematicRunner.runSchematic('application', secondAppOptions, appTree);
|
94
93
|
|
95
94
|
const runner = new SchematicTestRunner('schematics', collectionPath);
|
96
|
-
const tree = await runner.
|
95
|
+
const tree = await runner.runSchematic('install', { project: 'testApp2' }, appTree);
|
97
96
|
const angularConfig = JSON.parse(tree.readContent('angular.json'));
|
98
97
|
const styles = angularConfig['projects']['testApp2']['architect']['build']['options']['styles'];
|
99
98
|
|
package/src/install/schema.json
CHANGED
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.latestVersions = void 0;
|
4
4
|
// TODO: implement
|
5
5
|
exports.latestVersions = {
|
6
|
-
'devextreme': '
|
7
|
-
'devextreme-angular': '
|
6
|
+
'devextreme': '24.1.4',
|
7
|
+
'devextreme-angular': '24.1.4',
|
8
8
|
'devextreme-cli': 'latest'
|
9
9
|
};
|
10
10
|
//# sourceMappingURL=latest-versions.js.map
|