1
|
|
|
import initializeApiServices from 'src/app/init-pre/api-services.init'; |
2
|
|
|
|
3
|
|
|
describe('src/app/init-pre/api-services.init.ts', () => { |
4
|
|
|
/** |
5
|
|
|
* [ |
6
|
|
|
* 'aclApiService', |
7
|
|
|
* 'appActionButtonService', |
8
|
|
|
* 'appCmsBlocks', |
9
|
|
|
* 'appModulesService', |
10
|
|
|
* 'appUrlChangeService', |
11
|
|
|
* 'businessEventService', |
12
|
|
|
* 'cacheApiService', |
13
|
|
|
* 'calculate-price', |
14
|
|
|
* 'cartStoreService', |
15
|
|
|
* 'checkoutStoreService', |
16
|
|
|
* 'configService', |
17
|
|
|
* 'customSnippetApiService', |
18
|
|
|
* 'customerGroupRegistrationService', |
19
|
|
|
* 'customerValidationService', |
20
|
|
|
* 'documentService', |
21
|
|
|
* 'excludedSearchTermService', |
22
|
|
|
* 'extensionSdkService', |
23
|
|
|
* 'firstRunWizardService', |
24
|
|
|
* 'flowActionService', |
25
|
|
|
* 'importExportService', |
26
|
|
|
* 'integrationService', |
27
|
|
|
* 'knownIpsService', |
28
|
|
|
* 'languagePluginService', |
29
|
|
|
* 'mailService', |
30
|
|
|
* 'mediaFolderService', |
31
|
|
|
* 'mediaService', |
32
|
|
|
* 'messageQueueService', |
33
|
|
|
* 'notificationsService', |
34
|
|
|
* 'numberRangeService', |
35
|
|
|
* 'orderDocumentApiService', |
36
|
|
|
* 'orderStateMachineService', |
37
|
|
|
* 'orderService', |
38
|
|
|
* 'productExportService', |
39
|
|
|
* 'productStreamPreviewService', |
40
|
|
|
* 'promotionSyncService', |
41
|
|
|
* 'recommendationsService', |
42
|
|
|
* 'ruleConditionsConfigApiService', |
43
|
|
|
* 'salesChannelService', |
44
|
|
|
* 'scheduledTaskService', |
45
|
|
|
* 'searchService', |
46
|
|
|
* 'seoUrlTemplateService', |
47
|
|
|
* 'seoUrlService', |
48
|
|
|
* 'snippetSetService', |
49
|
|
|
* 'snippetService', |
50
|
|
|
* 'stateMachineService', |
51
|
|
|
* 'contextStoreService', |
52
|
|
|
* 'storeService', |
53
|
|
|
* 'syncService', |
54
|
|
|
* 'systemConfigApiService', |
55
|
|
|
* 'tagApiService', |
56
|
|
|
* 'updateService', |
57
|
|
|
* 'userActivityApiService', |
58
|
|
|
* 'userConfigService', |
59
|
|
|
* 'userInputSanitizeService', |
60
|
|
|
* 'userRecoveryService', |
61
|
|
|
* 'userValidationService', |
62
|
|
|
* 'userService' |
63
|
|
|
* ] |
64
|
|
|
*/ |
65
|
|
|
|
66
|
|
|
it('should initialize the api services', () => { |
67
|
|
|
expect(Shopware.Service('aclApiService')).toBeUndefined(); |
|
|
|
|
68
|
|
|
expect(Shopware.Service('appActionButtonService')).toBeUndefined(); |
69
|
|
|
expect(Shopware.Service('appCmsBlocks')).toBeUndefined(); |
70
|
|
|
expect(Shopware.Service('appModulesService')).toBeUndefined(); |
71
|
|
|
expect(Shopware.Service('appUrlChangeService')).toBeUndefined(); |
72
|
|
|
expect(Shopware.Service('businessEventService')).toBeUndefined(); |
73
|
|
|
expect(Shopware.Service('cacheApiService')).toBeUndefined(); |
74
|
|
|
expect(Shopware.Service('calculate-price')).toBeUndefined(); |
75
|
|
|
expect(Shopware.Service('cartStoreService')).toBeUndefined(); |
76
|
|
|
expect(Shopware.Service('checkoutStoreService')).toBeUndefined(); |
77
|
|
|
expect(Shopware.Service('configService')).toBeUndefined(); |
78
|
|
|
expect(Shopware.Service('customSnippetApiService')).toBeUndefined(); |
79
|
|
|
expect(Shopware.Service('customerGroupRegistrationService')).toBeUndefined(); |
80
|
|
|
expect(Shopware.Service('customerValidationService')).toBeUndefined(); |
81
|
|
|
expect(Shopware.Service('documentService')).toBeUndefined(); |
82
|
|
|
expect(Shopware.Service('excludedSearchTermService')).toBeUndefined(); |
83
|
|
|
expect(Shopware.Service('extensionSdkService')).toBeUndefined(); |
84
|
|
|
expect(Shopware.Service('firstRunWizardService')).toBeUndefined(); |
85
|
|
|
expect(Shopware.Service('flowActionService')).toBeUndefined(); |
86
|
|
|
expect(Shopware.Service('importExportService')).toBeUndefined(); |
87
|
|
|
expect(Shopware.Service('integrationService')).toBeUndefined(); |
88
|
|
|
expect(Shopware.Service('knownIpsService')).toBeUndefined(); |
89
|
|
|
expect(Shopware.Service('languagePluginService')).toBeUndefined(); |
90
|
|
|
expect(Shopware.Service('mailService')).toBeUndefined(); |
91
|
|
|
expect(Shopware.Service('mediaFolderService')).toBeUndefined(); |
92
|
|
|
expect(Shopware.Service('mediaService')).toBeUndefined(); |
93
|
|
|
expect(Shopware.Service('messageQueueService')).toBeUndefined(); |
94
|
|
|
expect(Shopware.Service('notificationsService')).toBeUndefined(); |
95
|
|
|
expect(Shopware.Service('numberRangeService')).toBeUndefined(); |
96
|
|
|
expect(Shopware.Service('orderDocumentApiService')).toBeUndefined(); |
97
|
|
|
expect(Shopware.Service('orderStateMachineService')).toBeUndefined(); |
98
|
|
|
expect(Shopware.Service('orderService')).toBeUndefined(); |
99
|
|
|
expect(Shopware.Service('productExportService')).toBeUndefined(); |
100
|
|
|
expect(Shopware.Service('productStreamPreviewService')).toBeUndefined(); |
101
|
|
|
expect(Shopware.Service('promotionSyncService')).toBeUndefined(); |
102
|
|
|
expect(Shopware.Service('recommendationsService')).toBeUndefined(); |
103
|
|
|
expect(Shopware.Service('ruleConditionsConfigApiService')).toBeUndefined(); |
104
|
|
|
expect(Shopware.Service('salesChannelService')).toBeUndefined(); |
105
|
|
|
expect(Shopware.Service('scheduledTaskService')).toBeUndefined(); |
106
|
|
|
expect(Shopware.Service('searchService')).toBeUndefined(); |
107
|
|
|
expect(Shopware.Service('seoUrlTemplateService')).toBeUndefined(); |
108
|
|
|
expect(Shopware.Service('seoUrlService')).toBeUndefined(); |
109
|
|
|
expect(Shopware.Service('snippetSetService')).toBeUndefined(); |
110
|
|
|
expect(Shopware.Service('snippetService')).toBeUndefined(); |
111
|
|
|
expect(Shopware.Service('stateMachineService')).toBeUndefined(); |
112
|
|
|
expect(Shopware.Service('contextStoreService')).toBeUndefined(); |
113
|
|
|
expect(Shopware.Service('storeService')).toBeUndefined(); |
114
|
|
|
expect(Shopware.Service('syncService')).toBeUndefined(); |
115
|
|
|
expect(Shopware.Service('systemConfigApiService')).toBeUndefined(); |
116
|
|
|
expect(Shopware.Service('tagApiService')).toBeUndefined(); |
117
|
|
|
expect(Shopware.Service('updateService')).toBeUndefined(); |
118
|
|
|
expect(Shopware.Service('userActivityApiService')).toBeUndefined(); |
119
|
|
|
expect(Shopware.Service('userConfigService')).toBeUndefined(); |
120
|
|
|
expect(Shopware.Service('userInputSanitizeService')).toBeUndefined(); |
121
|
|
|
expect(Shopware.Service('userRecoveryService')).toBeUndefined(); |
122
|
|
|
expect(Shopware.Service('userValidationService')).toBeUndefined(); |
123
|
|
|
expect(Shopware.Service('userService')).toBeUndefined(); |
124
|
|
|
|
125
|
|
|
initializeApiServices(); |
126
|
|
|
|
127
|
|
|
expect(Shopware.Service('aclApiService')).toBeDefined(); |
128
|
|
|
expect(Shopware.Service('appActionButtonService')).toBeDefined(); |
129
|
|
|
expect(Shopware.Service('appCmsBlocks')).toBeDefined(); |
130
|
|
|
expect(Shopware.Service('appModulesService')).toBeDefined(); |
131
|
|
|
expect(Shopware.Service('appUrlChangeService')).toBeDefined(); |
132
|
|
|
expect(Shopware.Service('businessEventService')).toBeDefined(); |
133
|
|
|
expect(Shopware.Service('cacheApiService')).toBeDefined(); |
134
|
|
|
expect(Shopware.Service('calculate-price')).toBeDefined(); |
135
|
|
|
expect(Shopware.Service('cartStoreService')).toBeDefined(); |
136
|
|
|
expect(Shopware.Service('checkoutStoreService')).toBeDefined(); |
137
|
|
|
expect(Shopware.Service('configService')).toBeDefined(); |
138
|
|
|
expect(Shopware.Service('customSnippetApiService')).toBeDefined(); |
139
|
|
|
expect(Shopware.Service('customerGroupRegistrationService')).toBeDefined(); |
140
|
|
|
expect(Shopware.Service('customerValidationService')).toBeDefined(); |
141
|
|
|
expect(Shopware.Service('documentService')).toBeDefined(); |
142
|
|
|
expect(Shopware.Service('excludedSearchTermService')).toBeDefined(); |
143
|
|
|
expect(Shopware.Service('extensionSdkService')).toBeDefined(); |
144
|
|
|
expect(Shopware.Service('firstRunWizardService')).toBeDefined(); |
145
|
|
|
expect(Shopware.Service('flowActionService')).toBeDefined(); |
146
|
|
|
expect(Shopware.Service('importExportService')).toBeDefined(); |
147
|
|
|
expect(Shopware.Service('integrationService')).toBeDefined(); |
148
|
|
|
expect(Shopware.Service('knownIpsService')).toBeDefined(); |
149
|
|
|
expect(Shopware.Service('languagePluginService')).toBeDefined(); |
150
|
|
|
expect(Shopware.Service('mailService')).toBeDefined(); |
151
|
|
|
expect(Shopware.Service('mediaFolderService')).toBeDefined(); |
152
|
|
|
expect(Shopware.Service('mediaService')).toBeDefined(); |
153
|
|
|
expect(Shopware.Service('messageQueueService')).toBeDefined(); |
154
|
|
|
expect(Shopware.Service('notificationsService')).toBeDefined(); |
155
|
|
|
expect(Shopware.Service('numberRangeService')).toBeDefined(); |
156
|
|
|
expect(Shopware.Service('orderDocumentApiService')).toBeDefined(); |
157
|
|
|
expect(Shopware.Service('orderStateMachineService')).toBeDefined(); |
158
|
|
|
expect(Shopware.Service('orderService')).toBeDefined(); |
159
|
|
|
expect(Shopware.Service('productExportService')).toBeDefined(); |
160
|
|
|
expect(Shopware.Service('productStreamPreviewService')).toBeDefined(); |
161
|
|
|
expect(Shopware.Service('promotionSyncService')).toBeDefined(); |
162
|
|
|
expect(Shopware.Service('recommendationsService')).toBeDefined(); |
163
|
|
|
expect(Shopware.Service('ruleConditionsConfigApiService')).toBeDefined(); |
164
|
|
|
expect(Shopware.Service('salesChannelService')).toBeDefined(); |
165
|
|
|
expect(Shopware.Service('scheduledTaskService')).toBeDefined(); |
166
|
|
|
expect(Shopware.Service('searchService')).toBeDefined(); |
167
|
|
|
expect(Shopware.Service('seoUrlTemplateService')).toBeDefined(); |
168
|
|
|
expect(Shopware.Service('seoUrlService')).toBeDefined(); |
169
|
|
|
expect(Shopware.Service('snippetSetService')).toBeDefined(); |
170
|
|
|
expect(Shopware.Service('snippetService')).toBeDefined(); |
171
|
|
|
expect(Shopware.Service('stateMachineService')).toBeDefined(); |
172
|
|
|
expect(Shopware.Service('contextStoreService')).toBeDefined(); |
173
|
|
|
expect(Shopware.Service('storeService')).toBeDefined(); |
174
|
|
|
expect(Shopware.Service('syncService')).toBeDefined(); |
175
|
|
|
expect(Shopware.Service('systemConfigApiService')).toBeDefined(); |
176
|
|
|
expect(Shopware.Service('tagApiService')).toBeDefined(); |
177
|
|
|
expect(Shopware.Service('updateService')).toBeDefined(); |
178
|
|
|
expect(Shopware.Service('userActivityApiService')).toBeDefined(); |
179
|
|
|
expect(Shopware.Service('userConfigService')).toBeDefined(); |
180
|
|
|
expect(Shopware.Service('userInputSanitizeService')).toBeDefined(); |
181
|
|
|
expect(Shopware.Service('userRecoveryService')).toBeDefined(); |
182
|
|
|
expect(Shopware.Service('userValidationService')).toBeDefined(); |
183
|
|
|
expect(Shopware.Service('userService')).toBeDefined(); |
184
|
|
|
}); |
185
|
|
|
}); |
186
|
|
|
|
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.