@ihk-gfi/lux-components-update 14.8.0 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/README.md +4 -2
  2. package/add-lux-components/files/app/app.component.html +34 -0
  3. package/{src/add-lux-components → add-lux-components}/files/app/app.component.spec.ts +4 -2
  4. package/{src/add-lux-components → add-lux-components}/files/app/app.component.ts +1 -1
  5. package/add-lux-components/files/src/main.ts +17 -0
  6. package/{src/add-lux-components → add-lux-components}/index.js +29 -30
  7. package/add-lux-components/schema.json +23 -0
  8. package/collection.json +35 -0
  9. package/package.json +27 -27
  10. package/{src/theme → theme}/change-theme-to-authentic/index.js +0 -1
  11. package/theme/change-theme-to-authentic/schema.json +23 -0
  12. package/{src/theme → theme}/change-to-lux-icons/index.js +0 -1
  13. package/theme/change-to-lux-icons/schema.json +23 -0
  14. package/{src/update-dependencies → update-dependencies}/index.d.ts +1 -0
  15. package/update-dependencies/index.js +92 -0
  16. package/update-dependencies/schema.json +23 -0
  17. package/{src/update-en-messages → update-en-messages}/index.js +0 -1
  18. package/update-en-messages/schema.json +23 -0
  19. package/updates/15.0.0/index.d.ts +8 -0
  20. package/updates/15.0.0/index.js +109 -0
  21. package/updates/15.0.0/schema.json +23 -0
  22. package/{src/utility → utility}/dependencies.js +0 -1
  23. package/{src/utility → utility}/files.js +0 -1
  24. package/{src/utility → utility}/html/hit.js +0 -1
  25. package/{src/utility → utility}/html/html-manipulator.js +0 -1
  26. package/{src/utility → utility}/html/manipulator-functions.js +0 -1
  27. package/{src/utility → utility}/json.d.ts +2 -0
  28. package/{src/utility → utility}/json.js +16 -8
  29. package/{src/utility → utility}/logging.js +0 -1
  30. package/{src/utility → utility}/test.js +0 -1
  31. package/{src/utility → utility}/typescript.js +0 -1
  32. package/{src/utility → utility}/util.js +0 -1
  33. package/{src/utility → utility}/validation.js +0 -1
  34. package/src/add-lux-components/files/app/app.component.html +0 -32
  35. package/src/add-lux-components/files/app/base/license-hint/license-hint.component.html +0 -7
  36. package/src/add-lux-components/files/app/base/license-hint/license-hint.component.ts +0 -18
  37. package/src/add-lux-components/files/app/error/error.component.html +0 -10
  38. package/src/add-lux-components/files/app/error/error.component.scss +0 -3
  39. package/src/add-lux-components/files/app/error/error.component.spec.ts +0 -49
  40. package/src/add-lux-components/files/app/error/error.component.ts +0 -17
  41. package/src/add-lux-components/files/app/home/home.component.html +0 -7
  42. package/src/add-lux-components/files/app/home/home.component.scss +0 -3
  43. package/src/add-lux-components/files/app/home/home.component.ts +0 -13
  44. package/src/add-lux-components/files/app/profil/profil.component.html +0 -1
  45. package/src/add-lux-components/files/app/profil/profil.component.scss +0 -0
  46. package/src/add-lux-components/files/app/profil/profil.component.spec.ts +0 -24
  47. package/src/add-lux-components/files/app/profil/profil.component.ts +0 -11
  48. package/src/add-lux-components/files/assets/svg/Example.svg +0 -6
  49. package/src/add-lux-components/files/assets/svg/android.svg +0 -2
  50. package/src/add-lux-components/files/assets/svg/box.svg +0 -690
  51. package/src/add-lux-components/files/assets/svg/demoAppLogo.svg +0 -1
  52. package/src/add-lux-components/files/assets/svg/red_power_button.svg +0 -67
  53. package/src/add-lux-components/files/assets/svg/svg2009.svg +0 -57457
  54. package/src/add-lux-components/files/src/polyfills.ts +0 -58
  55. package/src/add-lux-components/index.js.map +0 -1
  56. package/src/add-lux-components/index.ts +0 -293
  57. package/src/add-lux-components/index_spec.d.ts +0 -1
  58. package/src/add-lux-components/index_spec.js +0 -51
  59. package/src/add-lux-components/index_spec.js.map +0 -1
  60. package/src/add-lux-components/index_spec.ts +0 -55
  61. package/src/add-lux-components/schema.json +0 -23
  62. package/src/collection.json +0 -75
  63. package/src/theme/change-theme-to-authentic/index.js.map +0 -1
  64. package/src/theme/change-theme-to-authentic/index.ts +0 -131
  65. package/src/theme/change-theme-to-authentic/index_spec.d.ts +0 -1
  66. package/src/theme/change-theme-to-authentic/index_spec.js +0 -300
  67. package/src/theme/change-theme-to-authentic/index_spec.js.map +0 -1
  68. package/src/theme/change-theme-to-authentic/index_spec.ts +0 -321
  69. package/src/theme/change-theme-to-authentic/schema.json +0 -23
  70. package/src/theme/change-to-lux-icons/index.js.map +0 -1
  71. package/src/theme/change-to-lux-icons/index.ts +0 -392
  72. package/src/theme/change-to-lux-icons/index_spec.d.ts +0 -1
  73. package/src/theme/change-to-lux-icons/index_spec.js +0 -128
  74. package/src/theme/change-to-lux-icons/index_spec.js.map +0 -1
  75. package/src/theme/change-to-lux-icons/index_spec.ts +0 -130
  76. package/src/theme/change-to-lux-icons/schema.json +0 -23
  77. package/src/update-dependencies/index.js +0 -88
  78. package/src/update-dependencies/index.js.map +0 -1
  79. package/src/update-dependencies/index.ts +0 -86
  80. package/src/update-dependencies/schema.json +0 -23
  81. package/src/update-en-messages/index.js.map +0 -1
  82. package/src/update-en-messages/index.ts +0 -83
  83. package/src/update-en-messages/index_spec.d.ts +0 -1
  84. package/src/update-en-messages/index_spec.js +0 -174
  85. package/src/update-en-messages/index_spec.js.map +0 -1
  86. package/src/update-en-messages/index_spec.ts +0 -182
  87. package/src/update-en-messages/schema.json +0 -23
  88. package/src/updates/update140000/files/src/polyfills.ts +0 -70
  89. package/src/updates/update140000/index.d.ts +0 -14
  90. package/src/updates/update140000/index.js +0 -95
  91. package/src/updates/update140000/index.js.map +0 -1
  92. package/src/updates/update140000/index.ts +0 -110
  93. package/src/updates/update140000/index_spec.d.ts +0 -1
  94. package/src/updates/update140000/index_spec.js +0 -165
  95. package/src/updates/update140000/index_spec.js.map +0 -1
  96. package/src/updates/update140000/index_spec.ts +0 -171
  97. package/src/updates/update140000/schema.json +0 -23
  98. package/src/updates/update140100/index.d.ts +0 -5
  99. package/src/updates/update140100/index.js +0 -62
  100. package/src/updates/update140100/index.js.map +0 -1
  101. package/src/updates/update140100/index.ts +0 -60
  102. package/src/updates/update140100/index_spec.d.ts +0 -1
  103. package/src/updates/update140100/index_spec.js +0 -124
  104. package/src/updates/update140100/index_spec.js.map +0 -1
  105. package/src/updates/update140100/index_spec.ts +0 -137
  106. package/src/updates/update140100/schema.json +0 -23
  107. package/src/updates/update140200/index.d.ts +0 -8
  108. package/src/updates/update140200/index.js +0 -40
  109. package/src/updates/update140200/index.js.map +0 -1
  110. package/src/updates/update140200/index.ts +0 -38
  111. package/src/updates/update140200/index_spec.d.ts +0 -1
  112. package/src/updates/update140200/index_spec.js +0 -75
  113. package/src/updates/update140200/index_spec.js.map +0 -1
  114. package/src/updates/update140200/index_spec.ts +0 -81
  115. package/src/updates/update140200/schema.json +0 -23
  116. package/src/updates/update140300/index.d.ts +0 -10
  117. package/src/updates/update140300/index.js +0 -85
  118. package/src/updates/update140300/index.js.map +0 -1
  119. package/src/updates/update140300/index.ts +0 -86
  120. package/src/updates/update140300/index_spec.d.ts +0 -1
  121. package/src/updates/update140300/index_spec.js +0 -145
  122. package/src/updates/update140300/index_spec.js.map +0 -1
  123. package/src/updates/update140300/index_spec.ts +0 -177
  124. package/src/updates/update140300/schema.json +0 -23
  125. package/src/updates/update140400/index.d.ts +0 -2
  126. package/src/updates/update140400/index.js +0 -22
  127. package/src/updates/update140400/index.js.map +0 -1
  128. package/src/updates/update140400/index.ts +0 -18
  129. package/src/updates/update140400/index_spec.d.ts +0 -1
  130. package/src/updates/update140400/index_spec.js +0 -75
  131. package/src/updates/update140400/index_spec.js.map +0 -1
  132. package/src/updates/update140400/index_spec.ts +0 -81
  133. package/src/updates/update140400/schema.json +0 -23
  134. package/src/updates/update140500/index.d.ts +0 -2
  135. package/src/updates/update140500/index.js +0 -21
  136. package/src/updates/update140500/index.js.map +0 -1
  137. package/src/updates/update140500/index.ts +0 -17
  138. package/src/updates/update140500/index_spec.d.ts +0 -1
  139. package/src/updates/update140500/index_spec.js +0 -73
  140. package/src/updates/update140500/index_spec.js.map +0 -1
  141. package/src/updates/update140500/index_spec.ts +0 -78
  142. package/src/updates/update140500/schema.json +0 -23
  143. package/src/updates/update140600/index.d.ts +0 -2
  144. package/src/updates/update140600/index.js +0 -39
  145. package/src/updates/update140600/index.js.map +0 -1
  146. package/src/updates/update140600/index.ts +0 -35
  147. package/src/updates/update140600/index_spec.d.ts +0 -1
  148. package/src/updates/update140600/index_spec.js +0 -71
  149. package/src/updates/update140600/index_spec.js.map +0 -1
  150. package/src/updates/update140600/index_spec.ts +0 -75
  151. package/src/updates/update140600/schema.json +0 -23
  152. package/src/updates/update140700/index.d.ts +0 -2
  153. package/src/updates/update140700/index.js +0 -22
  154. package/src/updates/update140700/index.js.map +0 -1
  155. package/src/updates/update140700/index.ts +0 -18
  156. package/src/updates/update140700/index_spec.d.ts +0 -1
  157. package/src/updates/update140700/index_spec.js +0 -75
  158. package/src/updates/update140700/index_spec.js.map +0 -1
  159. package/src/updates/update140700/index_spec.ts +0 -79
  160. package/src/updates/update140700/schema.json +0 -23
  161. package/src/updates/update140800/index.d.ts +0 -2
  162. package/src/updates/update140800/index.js +0 -22
  163. package/src/updates/update140800/index.js.map +0 -1
  164. package/src/updates/update140800/index.ts +0 -18
  165. package/src/updates/update140800/index_spec.d.ts +0 -1
  166. package/src/updates/update140800/index_spec.js +0 -76
  167. package/src/updates/update140800/index_spec.js.map +0 -1
  168. package/src/updates/update140800/index_spec.ts +0 -82
  169. package/src/updates/update140800/schema.json +0 -23
  170. package/src/utility/dependencies.js.map +0 -1
  171. package/src/utility/dependencies.ts +0 -144
  172. package/src/utility/files.js.map +0 -1
  173. package/src/utility/files.ts +0 -368
  174. package/src/utility/html/hit.js.map +0 -1
  175. package/src/utility/html/hit.ts +0 -28
  176. package/src/utility/html/html-manipulator.js.map +0 -1
  177. package/src/utility/html/html-manipulator.ts +0 -156
  178. package/src/utility/html/html_spec.d.ts +0 -1
  179. package/src/utility/html/html_spec.js +0 -692
  180. package/src/utility/html/html_spec.js.map +0 -1
  181. package/src/utility/html/html_spec.ts +0 -751
  182. package/src/utility/html/manipulator-functions.js.map +0 -1
  183. package/src/utility/html/manipulator-functions.ts +0 -149
  184. package/src/utility/json.js.map +0 -1
  185. package/src/utility/json.ts +0 -288
  186. package/src/utility/json_spec.d.ts +0 -1
  187. package/src/utility/json_spec.js +0 -326
  188. package/src/utility/json_spec.js.map +0 -1
  189. package/src/utility/json_spec.ts +0 -446
  190. package/src/utility/logging.js.map +0 -1
  191. package/src/utility/logging.ts +0 -80
  192. package/src/utility/test.js.map +0 -1
  193. package/src/utility/test.ts +0 -24
  194. package/src/utility/typescript.js.map +0 -1
  195. package/src/utility/typescript.ts +0 -598
  196. package/src/utility/typescript_spec.d.ts +0 -1
  197. package/src/utility/typescript_spec.js +0 -1005
  198. package/src/utility/typescript_spec.js.map +0 -1
  199. package/src/utility/typescript_spec.ts +0 -1265
  200. package/src/utility/util.js.map +0 -1
  201. package/src/utility/util.ts +0 -145
  202. package/src/utility/validation.js.map +0 -1
  203. package/src/utility/validation.ts +0 -48
  204. package/tsconfig.json +0 -35
  205. /package/{src/add-lux-components → add-lux-components}/files/app/app-routing.module.ts +0 -0
  206. /package/{src/add-lux-components → add-lux-components}/files/app/app.module.ts +0 -0
  207. /package/{src/add-lux-components → add-lux-components}/files/environments/environment.prod.ts +0 -0
  208. /package/{src/add-lux-components → add-lux-components}/files/environments/environment.ts +0 -0
  209. /package/{src/add-lux-components → add-lux-components}/files/locale/messages.en.xlf +0 -0
  210. /package/{src/add-lux-components → add-lux-components}/files/locale/messages.xlf +0 -0
  211. /package/{src/add-lux-components → add-lux-components}/files/src/index.html +0 -0
  212. /package/{src/add-lux-components → add-lux-components}/index.d.ts +0 -0
  213. /package/{src/theme → theme}/change-theme-to-authentic/index.d.ts +0 -0
  214. /package/{src/theme → theme}/change-to-lux-icons/index.d.ts +0 -0
  215. /package/{src/update-en-messages → update-en-messages}/index.d.ts +0 -0
  216. /package/{src/utility → utility}/dependencies.d.ts +0 -0
  217. /package/{src/utility → utility}/files.d.ts +0 -0
  218. /package/{src/utility → utility}/html/hit.d.ts +0 -0
  219. /package/{src/utility → utility}/html/html-manipulator.d.ts +0 -0
  220. /package/{src/utility → utility}/html/manipulator-functions.d.ts +0 -0
  221. /package/{src/utility → utility}/logging.d.ts +0 -0
  222. /package/{src/utility → utility}/test.d.ts +0 -0
  223. /package/{src/utility → utility}/typescript.d.ts +0 -0
  224. /package/{src/utility → utility}/util.d.ts +0 -0
  225. /package/{src/utility → utility}/validation.d.ts +0 -0
@@ -1,1005 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const testing_1 = require("@angular-devkit/schematics/testing");
13
- const path = require("path");
14
- const test_1 = require("../utility/test");
15
- const util_1 = require("../utility/util");
16
- const typescript_1 = require("./typescript");
17
- const collectionPath = path.join(__dirname, '../collection.json');
18
- describe('typescript', () => {
19
- let appTree;
20
- let runner;
21
- const testOptions = {};
22
- beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
23
- runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
24
- appTree = yield runner.runExternalSchematicAsync('@schematics/angular', 'workspace', test_1.workspaceOptions).toPromise();
25
- appTree = yield runner
26
- .runExternalSchematicAsync('@schematics/angular', 'application', test_1.appOptions, appTree)
27
- .toPromise();
28
- util_1.UtilConfig.defaultWaitMS = 0;
29
- testOptions.project = test_1.appOptions.name;
30
- testOptions.path = test_1.workspaceOptions.newProjectRoot + '/' + test_1.appOptions.name;
31
- testOptions.verbose = true;
32
- }));
33
- describe('[Method] removeProvider', () => {
34
- it('Sollte den Provider (mehrere Provider - erster Provider) entfernen', (done) => {
35
- var _a;
36
- const filePath = testOptions.path + '/src/app/test.component.ts';
37
- appTree.create(filePath, `
38
- import { environment } from '../environments/environment';
39
-
40
- @NgModule({
41
- declarations : [
42
- AppComponent
43
- ],
44
- imports : [
45
- HttpClientModule,
46
- ],
47
- entryComponents: [
48
- LuxFilePreviewComponent
49
- ],
50
- providers : [
51
- LuxStorageService,
52
- LuxDialogService,
53
- DatePipe
54
- ],
55
- bootstrap : [
56
- AppComponent
57
- ]
58
- })
59
- export class AppModule {
60
- }
61
-
62
- `);
63
- (0, typescript_1.removeProvider)(appTree, filePath, 'LuxStorageService', false);
64
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
65
- expect(content).toContain('providers : [\n LuxDialogService,\n DatePipe\n ],');
66
- done();
67
- });
68
- it('Sollte den Provider (mehrere Provider - mittlerer Provider) entfernen', (done) => {
69
- var _a;
70
- const filePath = testOptions.path + '/src/app/test.component.ts';
71
- appTree.create(filePath, `
72
- import { environment } from '../environments/environment';
73
-
74
- @NgModule({
75
- declarations : [
76
- AppComponent
77
- ],
78
- imports : [
79
- HttpClientModule,
80
- ],
81
- entryComponents: [
82
- LuxFilePreviewComponent
83
- ],
84
- providers : [
85
- LuxDialogService,
86
- LuxStorageService,
87
- DatePipe
88
- ],
89
- bootstrap : [
90
- AppComponent
91
- ]
92
- })
93
- export class AppModule {
94
- }
95
-
96
- `);
97
- (0, typescript_1.removeProvider)(appTree, filePath, 'LuxStorageService', false);
98
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
99
- expect(content).toContain('providers : [\n LuxDialogService,\n DatePipe\n ],');
100
- done();
101
- });
102
- it('Sollte den Provider (mehrere Provider - mittlerer Provider - komplexer Provider) entfernen', (done) => {
103
- var _a;
104
- const filePath = testOptions.path + '/src/app/test.component.ts';
105
- appTree.create(filePath, `
106
- import { environment } from '../environments/environment';
107
-
108
- @NgModule({
109
- declarations : [
110
- AppComponent
111
- ],
112
- imports : [
113
- HttpClientModule,
114
- ],
115
- entryComponents: [
116
- LuxFilePreviewComponent
117
- ],
118
- providers : [
119
- LuxDialogService,
120
- {
121
- provide : HTTP_INTERCEPTORS,
122
- useClass: UnauthorizedInterceptor,
123
- multi : true
124
- },
125
- DatePipe
126
- ],
127
- bootstrap : [
128
- AppComponent
129
- ]
130
- })
131
- export class AppModule {
132
- }
133
-
134
- `);
135
- (0, typescript_1.removeProvider)(appTree, filePath, 'HTTP_INTERCEPTORS', false);
136
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
137
- expect(content).toContain('providers : [\n LuxDialogService,\n DatePipe\n ],');
138
- done();
139
- });
140
- it('Sollte den Provider (mehrere Provider - letzter Provider) entfernen', (done) => {
141
- var _a;
142
- const filePath = testOptions.path + '/src/app/test.component.ts';
143
- appTree.create(filePath, `
144
- import { environment } from '../environments/environment';
145
-
146
- @NgModule({
147
- declarations : [
148
- AppComponent
149
- ],
150
- imports : [
151
- HttpClientModule,
152
- ],
153
- entryComponents: [
154
- LuxFilePreviewComponent
155
- ],
156
- providers : [
157
- LuxDialogService,
158
- DatePipe,
159
- LuxStorageService
160
- ],
161
- bootstrap : [
162
- AppComponent
163
- ]
164
- })
165
- export class AppModule {
166
- }
167
-
168
- `);
169
- (0, typescript_1.removeProvider)(appTree, filePath, 'LuxStorageService', false);
170
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
171
- expect(content).toContain('providers : [\n LuxDialogService,\n DatePipe\n ],');
172
- done();
173
- });
174
- it('Sollte den Provider (nicht vorhanden) entfernen', (done) => {
175
- var _a;
176
- const filePath = testOptions.path + '/src/app/test.component.ts';
177
- appTree.create(filePath, `
178
- import { environment } from '../environments/environment';
179
-
180
- @NgModule({
181
- declarations : [
182
- AppComponent
183
- ],
184
- imports : [
185
- HttpClientModule,
186
- ],
187
- entryComponents: [
188
- LuxFilePreviewComponent
189
- ],
190
- providers : [
191
- LuxDialogService,
192
- DatePipe
193
- ],
194
- bootstrap : [
195
- AppComponent
196
- ]
197
- })
198
- export class AppModule {
199
- }
200
-
201
- `);
202
- (0, typescript_1.removeProvider)(appTree, filePath, 'LuxStorageService', false);
203
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
204
- expect(content).toContain('providers : [\n LuxDialogService,\n DatePipe\n ],');
205
- done();
206
- });
207
- it('Sollte den Provider (Provider-Abschnitt fehlt vollständig) entfernen', (done) => {
208
- var _a;
209
- const filePath = testOptions.path + '/src/app/test.component.ts';
210
- appTree.create(filePath, `
211
- import { environment } from '../environments/environment';
212
-
213
- @NgModule({
214
- declarations : [
215
- AppComponent
216
- ],
217
- imports : [
218
- HttpClientModule,
219
- ],
220
- entryComponents: [
221
- LuxFilePreviewComponent
222
- ],
223
- bootstrap : [
224
- AppComponent
225
- ]
226
- })
227
- export class AppModule {
228
- }
229
-
230
- `);
231
- (0, typescript_1.removeProvider)(appTree, filePath, 'LuxStorageService', false);
232
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
233
- expect(content).not.toContain('providers');
234
- done();
235
- });
236
- });
237
- describe('[Method] removeInterface', () => {
238
- it('Sollte das Interface (mehrere Interfaces - erstes Interface) entfernen', (done) => {
239
- var _a;
240
- const filePath = testOptions.path + '/src/app/test.component.ts';
241
- appTree.create(filePath, `
242
- import { OnInit, OnDestroy, Component } from '@angular/core';
243
-
244
- @Component({
245
- selector : 'bp-anbindung-lazy',
246
- templateUrl: './anbindung-lazy.component.html'
247
- })
248
- export class AnbindungLazyComponent implements OnInit, OnDestroy {
249
-
250
- constructor() {
251
- }
252
-
253
- ngOnInit() {
254
- }
255
-
256
- }
257
-
258
- `);
259
- (0, typescript_1.removeInterface)(appTree, filePath, 'OnInit', false);
260
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
261
- expect(content).toContain("export class AnbindungLazyComponent implements OnDestroy {");
262
- done();
263
- });
264
- it('Sollte das Interface (mehrere Interfaces - mittleres Interface) entfernen', (done) => {
265
- var _a;
266
- const filePath = testOptions.path + '/src/app/test.component.ts';
267
- appTree.create(filePath, `
268
- import { OnChanges, OnInit, OnDestroy, Component } from '@angular/core';
269
-
270
- @Component({
271
- selector : 'bp-anbindung-lazy',
272
- templateUrl: './anbindung-lazy.component.html'
273
- })
274
- export class AnbindungLazyComponent implements OnChanges, OnInit, OnDestroy {
275
-
276
- constructor() {
277
- }
278
-
279
- ngOnInit() {
280
- }
281
-
282
- }
283
-
284
- `);
285
- (0, typescript_1.removeInterface)(appTree, filePath, 'OnInit', false);
286
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
287
- expect(content).toContain("export class AnbindungLazyComponent implements OnChanges, OnDestroy {");
288
- done();
289
- });
290
- it('Sollte das Interface (mehrere Interfaces - mittleres Interface - mit extends) entfernen', (done) => {
291
- var _a;
292
- const filePath = testOptions.path + '/src/app/test.component.ts';
293
- appTree.create(filePath, `
294
- import { OnChanges, OnInit, OnDestroy, Component } from '@angular/core';
295
-
296
- @Component({
297
- selector : 'bp-anbindung-lazy',
298
- templateUrl: './anbindung-lazy.component.html'
299
- })
300
- export class AnbindungLazyComponent extends Aaa implements OnChanges, OnInit, OnDestroy {
301
-
302
- constructor() {
303
- }
304
-
305
- ngOnInit() {
306
- }
307
-
308
- }
309
-
310
- `);
311
- (0, typescript_1.removeInterface)(appTree, filePath, 'OnInit', false);
312
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
313
- expect(content).toContain("export class AnbindungLazyComponent extends Aaa implements OnChanges, OnDestroy {");
314
- done();
315
- });
316
- it('Sollte das Interface (mehrere Interfaces - letztes Interface) entfernen', (done) => {
317
- var _a;
318
- const filePath = testOptions.path + '/src/app/test.component.ts';
319
- appTree.create(filePath, `
320
- import { OnChanges, OnInit, OnDestroy, Component } from '@angular/core';
321
-
322
- @Component({
323
- selector : 'bp-anbindung-lazy',
324
- templateUrl: './anbindung-lazy.component.html'
325
- })
326
- export class AnbindungLazyComponent implements OnChanges, OnDestroy, OnInit {
327
-
328
- constructor() {
329
- }
330
-
331
- ngOnInit() {
332
- }
333
-
334
- }
335
-
336
- `);
337
- (0, typescript_1.removeInterface)(appTree, filePath, 'OnInit', false);
338
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
339
- expect(content).toContain("export class AnbindungLazyComponent implements OnChanges, OnDestroy {");
340
- done();
341
- });
342
- it('Sollte das Interface (nicht vorhanden) entfernen', (done) => {
343
- var _a;
344
- const filePath = testOptions.path + '/src/app/test.component.ts';
345
- appTree.create(filePath, `
346
- import { OnChanges, OnDestroy, Component } from '@angular/core';
347
-
348
- @Component({
349
- selector : 'bp-anbindung-lazy',
350
- templateUrl: './anbindung-lazy.component.html'
351
- })
352
- export class AnbindungLazyComponent {
353
-
354
- constructor() {
355
- }
356
-
357
- ngOnInit() {
358
- }
359
-
360
- }
361
-
362
- `);
363
- (0, typescript_1.removeInterface)(appTree, filePath, 'OnInit', false);
364
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
365
- expect(content).toContain("export class AnbindungLazyComponent {");
366
- done();
367
- });
368
- });
369
- describe('[Method] addInterface', () => {
370
- it('Sollte das Interface (mit extends - ohne Interface) hinzufügen', (done) => {
371
- var _a;
372
- const filePath = testOptions.path + '/src/app/test.component.ts';
373
- appTree.create(filePath, `
374
- @Component({
375
- selector : 'bp-anbindung-lazy',
376
- templateUrl: './anbindung-lazy.component.html'
377
- })
378
- export class AnbindungLazyComponent extends Aaa {
379
-
380
- constructor() {
381
- }
382
-
383
- ngOnInit() {
384
- }
385
-
386
- }
387
-
388
- `);
389
- (0, typescript_1.addInterface)(appTree, filePath, 'OnChanges', false);
390
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
391
- expect(content).toContain('export class AnbindungLazyComponent extends Aaa implements OnChanges {');
392
- done();
393
- });
394
- it('Sollte das Interface (mit extends - mit Interface) hinzufügen', (done) => {
395
- var _a;
396
- const filePath = testOptions.path + '/src/app/test.component.ts';
397
- appTree.create(filePath, `
398
- @Component({
399
- selector : 'bp-anbindung-lazy',
400
- templateUrl: './anbindung-lazy.component.html'
401
- })
402
- export class AnbindungLazyComponent extends Aaa implements Bbb {
403
-
404
- constructor() {
405
- }
406
-
407
- ngOnInit() {
408
- }
409
-
410
- }
411
-
412
- `);
413
- (0, typescript_1.addInterface)(appTree, filePath, 'OnChanges', false);
414
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
415
- expect(content).toContain('export class AnbindungLazyComponent extends Aaa implements Bbb, OnChanges {');
416
- done();
417
- });
418
- it('Sollte das Interface (ohne extends - ohne Interface) hinzufügen', (done) => {
419
- var _a;
420
- const filePath = testOptions.path + '/src/app/test.component.ts';
421
- appTree.create(filePath, `
422
- @Component({
423
- selector : 'bp-anbindung-lazy',
424
- templateUrl: './anbindung-lazy.component.html'
425
- })
426
- export class AnbindungLazyComponent {
427
-
428
- constructor() {
429
- }
430
-
431
- ngOnInit() {
432
- }
433
-
434
- }
435
-
436
- `);
437
- (0, typescript_1.addInterface)(appTree, filePath, 'OnChanges', false);
438
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
439
- expect(content).toContain('export class AnbindungLazyComponent implements OnChanges {');
440
- done();
441
- });
442
- it('Sollte das Interface (ohne extends - mit Interface) hinzufügen', (done) => {
443
- var _a;
444
- const filePath = testOptions.path + '/src/app/test.component.ts';
445
- appTree.create(filePath, `
446
- @Component({
447
- selector : 'bp-anbindung-lazy',
448
- templateUrl: './anbindung-lazy.component.html'
449
- })
450
- export class AnbindungLazyComponent implements OnInit {
451
-
452
- constructor() {
453
- }
454
-
455
- ngOnInit() {
456
- }
457
-
458
- }
459
-
460
- `);
461
- (0, typescript_1.addInterface)(appTree, filePath, 'OnChanges', false);
462
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
463
- expect(content).toContain('export class AnbindungLazyComponent implements OnInit, OnChanges {');
464
- done();
465
- });
466
- });
467
- describe('[Method] addImport', () => {
468
- it('Sollte den Import (kein Import vorhanden) hinzufügen', (done) => {
469
- var _a;
470
- const filePath = testOptions.path + '/src/app/test.component.ts';
471
- appTree.create(filePath, `
472
- @Component({
473
- selector : 'bp-anbindung-lazy',
474
- templateUrl: './anbindung-lazy.component.html'
475
- })
476
- export class AnbindungLazyComponent implements OnInit {
477
-
478
- constructor() {
479
- }
480
-
481
- ngOnInit() {
482
- }
483
-
484
- }
485
-
486
- `);
487
- (0, typescript_1.addImport)(appTree, filePath, '@angular/core', 'OnChanges', false);
488
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
489
- expect(content).toContain("import { OnChanges } from '@angular/core';");
490
- done();
491
- });
492
- it('Sollte den Import (bereits vorhanden) hinzufügen', (done) => {
493
- var _a;
494
- const filePath = testOptions.path + '/src/app/test.component.ts';
495
- appTree.create(filePath, `
496
- import { OnChanges, OnDestroy, Component } from '@angular/core';
497
-
498
- @Component({
499
- selector : 'bp-anbindung-lazy',
500
- templateUrl: './anbindung-lazy.component.html'
501
- })
502
- export class AnbindungLazyComponent implements OnInit {
503
-
504
- constructor() {
505
- }
506
-
507
- ngOnInit() {
508
- }
509
-
510
- }
511
-
512
- `);
513
- (0, typescript_1.addImport)(appTree, filePath, '@angular/core', 'OnChanges', false);
514
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
515
- expect(content).toContain("import { OnChanges, OnDestroy, Component } from '@angular/core';");
516
- done();
517
- });
518
- it('Sollte den Import (ein Import) hinzufügen', (done) => {
519
- var _a;
520
- const filePath = testOptions.path + '/src/app/test.component.ts';
521
- appTree.create(filePath, `
522
- import { OnInit } from '@angular/core';
523
-
524
- @Component({
525
- selector : 'bp-anbindung-lazy',
526
- templateUrl: './anbindung-lazy.component.html'
527
- })
528
- export class AnbindungLazyComponent implements OnInit {
529
-
530
- constructor() {
531
- }
532
-
533
- ngOnInit() {
534
- }
535
-
536
- }
537
-
538
- `);
539
- (0, typescript_1.addImport)(appTree, filePath, '@angular/core', 'OnChanges', false);
540
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
541
- expect(content).toContain("import { OnInit, OnChanges } from '@angular/core';");
542
- done();
543
- });
544
- it('Sollte den Import (mehrere Imports - einfache Anführungszeichen) hinzufügen', (done) => {
545
- var _a;
546
- const filePath = testOptions.path + '/src/app/test.component.ts';
547
- appTree.create(filePath, `
548
- import { OnInit, Component } from '@angular/core';
549
-
550
- @Component({
551
- selector : 'bp-anbindung-lazy',
552
- templateUrl: './anbindung-lazy.component.html'
553
- })
554
- export class AnbindungLazyComponent implements OnInit {
555
-
556
- constructor() {
557
- }
558
-
559
- ngOnInit() {
560
- }
561
-
562
- }
563
-
564
- `);
565
- (0, typescript_1.addImport)(appTree, filePath, '@angular/core', 'OnChanges', false);
566
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
567
- expect(content).toContain("import { OnInit, Component, OnChanges } from '@angular/core';");
568
- done();
569
- });
570
- it('Sollte den Import (mehrere Imports - doppelte Anführungszeichen) hinzufügen', (done) => {
571
- var _a;
572
- const filePath = testOptions.path + '/src/app/test.component.ts';
573
- appTree.create(filePath, `
574
- import { OnInit, Component } from "@angular/core";
575
-
576
- @Component({
577
- selector : 'bp-anbindung-lazy',
578
- templateUrl: './anbindung-lazy.component.html'
579
- })
580
- export class AnbindungLazyComponent implements OnInit {
581
-
582
- constructor() {
583
- }
584
-
585
- ngOnInit() {
586
- }
587
-
588
- }
589
-
590
- `);
591
- (0, typescript_1.addImport)(appTree, filePath, '@angular/core', 'OnChanges', false);
592
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
593
- expect(content).toContain(`import { OnInit, Component, OnChanges } from "@angular/core";`);
594
- done();
595
- });
596
- });
597
- describe('[Method] removeImport', () => {
598
- it('Sollte den Import (mehrere Imports - erster Import) entfernen', (done) => {
599
- var _a;
600
- const filePath = testOptions.path + '/src/app/test.component.ts';
601
- appTree.create(filePath, `
602
- import { OnInit, Component } from '@angular/core';
603
-
604
- @Component({
605
- selector : 'bp-anbindung-lazy',
606
- templateUrl: './anbindung-lazy.component.html'
607
- })
608
- export class AnbindungLazyComponent implements OnInit {
609
-
610
- constructor() {
611
- }
612
-
613
- ngOnInit() {
614
- }
615
-
616
- }
617
-
618
- `);
619
- (0, typescript_1.removeImport)(appTree, filePath, '@angular/core', 'OnInit', false);
620
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
621
- expect(content).toContain("import { Component } from '@angular/core';");
622
- done();
623
- });
624
- it('Sollte den Import (mehrere Imports - erster Import - doppelte Anführungszeichen) entfernen', (done) => {
625
- var _a;
626
- const filePath = testOptions.path + '/src/app/test.component.ts';
627
- appTree.create(filePath, `
628
- import { OnInit, Component } from "@angular/core";
629
-
630
- @Component({
631
- selector : 'bp-anbindung-lazy',
632
- templateUrl: './anbindung-lazy.component.html'
633
- })
634
- export class AnbindungLazyComponent implements OnInit {
635
-
636
- constructor() {
637
- }
638
-
639
- ngOnInit() {
640
- }
641
-
642
- }
643
-
644
- `);
645
- (0, typescript_1.removeImport)(appTree, filePath, '@angular/core', 'OnInit', false);
646
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
647
- expect(content).toContain(`import { Component } from "@angular/core";`);
648
- done();
649
- });
650
- it('Sollte den Import (mehrere Imports - mittlerer Import) entfernen', (done) => {
651
- var _a;
652
- const filePath = testOptions.path + '/src/app/test.component.ts';
653
- appTree.create(filePath, `
654
- import { OnDestroy, OnInit, Component } from '@angular/core';
655
-
656
- @Component({
657
- selector : 'bp-anbindung-lazy',
658
- templateUrl: './anbindung-lazy.component.html'
659
- })
660
- export class AnbindungLazyComponent implements OnInit {
661
-
662
- constructor() {
663
- }
664
-
665
- ngOnInit() {
666
- }
667
-
668
- }
669
-
670
- `);
671
- (0, typescript_1.removeImport)(appTree, filePath, '@angular/core', 'OnInit', false);
672
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
673
- expect(content).toContain("import { OnDestroy, Component } from '@angular/core';");
674
- done();
675
- });
676
- it('Sollte den Import (mehrere Imports - mittlerer Import - ohne Leerzeichen) entfernen', (done) => {
677
- var _a;
678
- const filePath = testOptions.path + '/src/app/test.component.ts';
679
- appTree.create(filePath, `
680
- import { OnDestroy,OnInit,Component } from '@angular/core';
681
-
682
- @Component({
683
- selector : 'bp-anbindung-lazy',
684
- templateUrl: './anbindung-lazy.component.html'
685
- })
686
- export class AnbindungLazyComponent implements OnInit {
687
-
688
- constructor() {
689
- }
690
-
691
- ngOnInit() {
692
- }
693
-
694
- }
695
-
696
- `);
697
- (0, typescript_1.removeImport)(appTree, filePath, '@angular/core', 'OnInit', false);
698
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
699
- expect(content).toContain("import { OnDestroy,Component } from '@angular/core';");
700
- done();
701
- });
702
- it('Sollte den Import (mehrere Imports - letzter Import) entfernen', (done) => {
703
- var _a;
704
- const filePath = testOptions.path + '/src/app/test.component.ts';
705
- appTree.create(filePath, `
706
- import { Component, OnInit } from '@angular/core';
707
-
708
- @Component({
709
- selector : 'bp-anbindung-lazy',
710
- templateUrl: './anbindung-lazy.component.html'
711
- })
712
- export class AnbindungLazyComponent implements OnInit {
713
-
714
- constructor() {
715
- }
716
-
717
- ngOnInit() {
718
- }
719
-
720
- }
721
-
722
- `);
723
- (0, typescript_1.removeImport)(appTree, filePath, '@angular/core', 'OnInit', false);
724
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
725
- expect(content).toContain("import { Component } from '@angular/core';");
726
- done();
727
- });
728
- it('Sollte den Import (nur Paketname) entfernen', (done) => {
729
- var _a;
730
- const filePath = testOptions.path + '/src/app/test.component.ts';
731
- appTree.create(filePath, `
732
- import '@angular/common/locales/global/de';
733
-
734
- @Component({
735
- selector : 'bp-anbindung-lazy',
736
- templateUrl: './anbindung-lazy.component.html'
737
- })
738
- export class AnbindungLazyComponent implements OnInit {
739
-
740
- constructor() {
741
- }
742
-
743
- ngOnInit() {
744
- }
745
-
746
- }
747
-
748
- `);
749
- (0, typescript_1.removeImport)(appTree, filePath, '@angular/common/locales/global/de', undefined, false);
750
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
751
- expect(content).not.toContain("import");
752
- done();
753
- });
754
- it('Sollte den Import (nur Paketname - nicht vorhanden) entfernen', (done) => {
755
- var _a;
756
- const filePath = testOptions.path + '/src/app/test.component.ts';
757
- appTree.create(filePath, `
758
- import '@angular/common/locales/global/de';
759
-
760
- @Component({
761
- selector : 'bp-anbindung-lazy',
762
- templateUrl: './anbindung-lazy.component.html'
763
- })
764
- export class AnbindungLazyComponent implements OnInit {
765
-
766
- constructor() {
767
- }
768
-
769
- ngOnInit() {
770
- }
771
-
772
- }
773
-
774
- `);
775
- (0, typescript_1.removeImport)(appTree, filePath, 'nichtDaAaa', undefined, false);
776
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
777
- expect(content).toContain("import '@angular/common/locales/global/de';");
778
- done();
779
- });
780
- it('Sollte den Import (nicht vorhanden) entfernen', (done) => {
781
- var _a;
782
- const filePath = testOptions.path + '/src/app/test.component.ts';
783
- appTree.create(filePath, `
784
- import { Component } from '@angular/core';
785
-
786
- @Component({
787
- selector : 'bp-anbindung-lazy',
788
- templateUrl: './anbindung-lazy.component.html'
789
- })
790
- export class AnbindungLazyComponent implements OnInit {
791
-
792
- constructor() {
793
- }
794
-
795
- ngOnInit() {
796
- }
797
-
798
- }
799
-
800
- `);
801
- (0, typescript_1.removeImport)(appTree, filePath, '@angular/core', 'OnInit', false);
802
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
803
- expect(content).toContain("import { Component } from '@angular/core';");
804
- done();
805
- });
806
- });
807
- describe('[Method] addConstructorContent', () => {
808
- it('Sollte Inhalt im Konstruktor (mit Konstruktor - append=false) hinzufügen', (done) => {
809
- var _a;
810
- const filePath = testOptions.path + '/src/app/test.component.ts';
811
- appTree.create(filePath, `
812
- @Component({
813
- selector : 'bp-anbindung-lazy',
814
- templateUrl: './anbindung-lazy.component.html'
815
- })
816
- export class AnbindungLazyComponent extends Aaa {
817
-
818
- constructor() {
819
- console.log();
820
- }
821
-
822
- ngOnInit() {
823
- }
824
-
825
- }
826
-
827
- `);
828
- (0, typescript_1.addConstructorContent)(appTree, filePath, 'router.initialNavigation();', false);
829
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
830
- expect(content).toContain('constructor() {\n router.initialNavigation();\n console.log();\n }');
831
- done();
832
- });
833
- it('Sollte Inhalt im Konstruktor (mit Konstruktor - append=true) hinzufügen', (done) => {
834
- var _a;
835
- const filePath = testOptions.path + '/src/app/test.component.ts';
836
- appTree.create(filePath, `
837
- @Component({
838
- selector : 'bp-anbindung-lazy',
839
- templateUrl: './anbindung-lazy.component.html'
840
- })
841
- export class AnbindungLazyComponent extends Aaa {
842
-
843
- constructor() {
844
- console.log();
845
- }
846
-
847
- ngOnInit() {
848
- }
849
-
850
- }
851
-
852
- `);
853
- (0, typescript_1.addConstructorContent)(appTree, filePath, 'router.initialNavigation();', true);
854
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
855
- expect(content).toContain('constructor() {\n console.log();\n router.initialNavigation();\n }');
856
- done();
857
- });
858
- it('Sollte Inhalt im Konstruktor (mit leerem Konstruktor - append=false) hinzufügen', (done) => {
859
- var _a;
860
- const filePath = testOptions.path + '/src/app/test.component.ts';
861
- appTree.create(filePath, `
862
- @Component({
863
- selector : 'bp-anbindung-lazy',
864
- templateUrl: './anbindung-lazy.component.html'
865
- })
866
- export class AnbindungLazyComponent extends Aaa {
867
-
868
- constructor() {}
869
-
870
- ngOnInit() {
871
- }
872
-
873
- }
874
-
875
- `);
876
- (0, typescript_1.addConstructorContent)(appTree, filePath, 'router.initialNavigation();', false);
877
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
878
- expect(content).toContain('constructor() {\n router.initialNavigation();\n }');
879
- done();
880
- });
881
- it('Sollte Inhalt im Konstruktor (mit leerem Konstruktor - append=true) hinzufügen', (done) => {
882
- var _a;
883
- const filePath = testOptions.path + '/src/app/test.component.ts';
884
- appTree.create(filePath, `
885
- @Component({
886
- selector : 'bp-anbindung-lazy',
887
- templateUrl: './anbindung-lazy.component.html'
888
- })
889
- export class AnbindungLazyComponent extends Aaa {
890
-
891
- constructor() {}
892
-
893
- ngOnInit() {
894
- }
895
-
896
- }
897
-
898
- `);
899
- (0, typescript_1.addConstructorContent)(appTree, filePath, 'router.initialNavigation();', true);
900
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
901
- expect(content).toContain('constructor() {\n router.initialNavigation();\n }');
902
- done();
903
- });
904
- it('Sollte Inhalt im Konstruktor (ohne Konstruktor - append=false) hinzufügen', (done) => {
905
- var _a;
906
- const filePath = testOptions.path + '/src/app/test.component.ts';
907
- appTree.create(filePath, `
908
- @Component({
909
- selector : 'bp-anbindung-lazy',
910
- templateUrl: './anbindung-lazy.component.html'
911
- })
912
- export class AnbindungLazyComponent extends Aaa {
913
-
914
- ngOnInit() {
915
- }
916
-
917
- }
918
-
919
- `);
920
- (0, typescript_1.addConstructorContent)(appTree, filePath, 'router.initialNavigation();', false);
921
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
922
- expect(content).toContain('constructor() {\n router.initialNavigation();\n }');
923
- done();
924
- });
925
- it('Sollte Inhalt im Konstruktor (ohne Konstruktor - append=true) hinzufügen', (done) => {
926
- var _a;
927
- const filePath = testOptions.path + '/src/app/test.component.ts';
928
- appTree.create(filePath, `
929
- @Component({
930
- selector : 'bp-anbindung-lazy',
931
- templateUrl: './anbindung-lazy.component.html'
932
- })
933
- export class AnbindungLazyComponent extends Aaa {
934
-
935
- ngOnInit() {
936
- }
937
-
938
- }
939
-
940
- `);
941
- (0, typescript_1.addConstructorContent)(appTree, filePath, 'router.initialNavigation();', true);
942
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
943
- expect(content).toContain('constructor() {\n router.initialNavigation();\n }');
944
- done();
945
- });
946
- });
947
- describe('[Method] addClassProperty', () => {
948
- it('Sollte eine Property (mit Properties) hinzufügen', (done) => {
949
- var _a;
950
- const filePath = testOptions.path + '/src/app/test.component.ts';
951
- appTree.create(filePath, `
952
- @Component({
953
- selector : 'app-root',
954
- templateUrl: './app.component.html',
955
- styleUrls : [ './app.component.scss' ]
956
- })
957
- export class AppComponent implements OnInit {
958
-
959
- luxVersion = '';
960
- isMaintenanceOrUnauthorized = false;
961
-
962
- constructor(private readonly fachService: AccountFacadeService,
963
- public router: Router, public window: Window,
964
- private appService: LuxAppService) {
965
- }
966
-
967
- ngOnInit(): void {
968
- }
969
-
970
- }
971
- `);
972
- (0, typescript_1.addClassProperty)(appTree, filePath, '@Input() luxAppHeader: \'normal\' | \'minimal\' | \'none\' = \'normal\';');
973
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
974
- expect(content).toContain(' @Input() luxAppHeader: \'normal\' | \'minimal\' | \'none\' = \'normal\';');
975
- done();
976
- });
977
- it('Sollte eine Property (ohne Properties) hinzufügen', (done) => {
978
- var _a;
979
- const filePath = testOptions.path + '/src/app/test.component.ts';
980
- appTree.create(filePath, `
981
- @Component({
982
- selector : 'app-root',
983
- templateUrl: './app.component.html',
984
- styleUrls : [ './app.component.scss' ]
985
- })
986
- export class AppComponent implements OnInit {
987
-
988
- constructor(private readonly fachService: AccountFacadeService,
989
- public router: Router, public window: Window,
990
- private appService: LuxAppService) {
991
- }
992
-
993
- ngOnInit(): void {
994
- }
995
-
996
- }
997
- `);
998
- (0, typescript_1.addClassProperty)(appTree, filePath, '@Input() luxAppHeader: \'normal\' | \'minimal\' | \'none\' = \'normal\';');
999
- const content = (_a = appTree.read(filePath)) === null || _a === void 0 ? void 0 : _a.toString();
1000
- expect(content).toContain(' @Input() luxAppHeader: \'normal\' | \'minimal\' | \'none\' = \'normal\';');
1001
- done();
1002
- });
1003
- });
1004
- });
1005
- //# sourceMappingURL=typescript_spec.js.map