@eui/cli 19.0.0-rc.1 → 19.0.0-rc.2
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.
- package/.version.properties +1 -1
- package/lib/skeletons/_angular/base/package.json +2 -2
- package/lib/skeletons/_angular/base/src/app/app.component.spec.ts +32 -2
- package/lib/skeletons/_angular/base-mobile/package.json +1 -1
- package/lib/skeletons/web-symfony/myapp-web/package.json +2 -2
- package/package.json +1 -1
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
19.0.0-rc.
|
|
1
|
+
19.0.0-rc.2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "19.0.0-rc.
|
|
3
|
+
"version": "19.0.0-rc.2",
|
|
4
4
|
"license": "EUPL-1.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"ng": "ng",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@eui/deps-base": "19.0.0-rc.
|
|
24
|
+
"@eui/deps-base": "19.0.0-rc.2"
|
|
25
25
|
},
|
|
26
26
|
"resolutions": {
|
|
27
27
|
"js-yaml": ">=3.13.1",
|
|
@@ -4,21 +4,51 @@ import { AppComponent } from './app.component';
|
|
|
4
4
|
import { EuiAppModule } from '@eui/components/layout';
|
|
5
5
|
import { routes } from './app.routes';
|
|
6
6
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
|
7
|
+
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
8
|
+
import { AppStarterService } from './app-starter.service';
|
|
9
|
+
import { CONFIG_TOKEN, I18nService, I18nState, UserService} from '@eui/core';
|
|
10
|
+
import { EuiAppConfig } from '@eui/core';
|
|
11
|
+
import { Observable, of } from 'rxjs';
|
|
12
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
13
|
+
import SpyObj = jasmine.SpyObj;
|
|
14
|
+
|
|
7
15
|
|
|
8
16
|
describe('AppComponent', () => {
|
|
9
17
|
let component: AppComponent;
|
|
10
18
|
let fixture: ComponentFixture<AppComponent>;
|
|
19
|
+
let userServiceMock: SpyObj<UserService>;
|
|
20
|
+
let i18nServiceMock: SpyObj<I18nService>;
|
|
21
|
+
let configMock: EuiAppConfig;
|
|
11
22
|
|
|
12
23
|
beforeEach(async () => {
|
|
24
|
+
|
|
25
|
+
// Handle the overloaded getState method
|
|
26
|
+
type GetStateReturnType<T> = T extends keyof I18nState ? Observable<I18nState[T]> : Observable<I18nState>;
|
|
27
|
+
|
|
28
|
+
userServiceMock = jasmine.createSpyObj('UserService', ['init']);
|
|
29
|
+
i18nServiceMock = jasmine.createSpyObj<I18nService>('I18nService', ['init', 'getState']);
|
|
30
|
+
i18nServiceMock.getState.and.callFake(<K extends keyof I18nState>(key?: K): GetStateReturnType<K> => {
|
|
31
|
+
if (typeof key === 'string') {
|
|
32
|
+
return of({ activeLang: 'en' }[key]) as GetStateReturnType<K>;
|
|
33
|
+
}
|
|
34
|
+
return of({ activeLang: 'en' }) as GetStateReturnType<K>;
|
|
35
|
+
});
|
|
36
|
+
configMock = {global: {}, modules: {core: {base: 'localhost:3000', userDetails: 'dummy'}}};
|
|
37
|
+
|
|
13
38
|
await TestBed.configureTestingModule({
|
|
14
39
|
imports: [
|
|
15
40
|
RouterModule.forRoot(routes),
|
|
16
41
|
EuiAppModule,
|
|
42
|
+
TranslateModule.forRoot(),
|
|
17
43
|
],
|
|
18
44
|
providers: [
|
|
19
|
-
|
|
45
|
+
provideHttpClient(withInterceptorsFromDi()),
|
|
46
|
+
provideHttpClientTesting(),
|
|
47
|
+
AppStarterService,
|
|
48
|
+
{provide: UserService, useValue: userServiceMock},
|
|
49
|
+
{provide: I18nService, useValue: i18nServiceMock},
|
|
50
|
+
{provide: CONFIG_TOKEN, useValue: configMock},
|
|
20
51
|
],
|
|
21
|
-
declarations: [AppComponent],
|
|
22
52
|
}).compileComponents();
|
|
23
53
|
|
|
24
54
|
fixture = TestBed.createComponent(AppComponent);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "19.0.0-rc.
|
|
3
|
+
"version": "19.0.0-rc.2",
|
|
4
4
|
"license": "EUPL-1.1",
|
|
5
5
|
"description": "eUI JEE Symfony app scripts",
|
|
6
6
|
"scripts": {
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
"private": true,
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@eui/deps-base": "19.0.0-rc.
|
|
21
|
+
"@eui/deps-base": "19.0.0-rc.2"
|
|
22
22
|
}
|
|
23
23
|
}
|