diff --git a/src/portal/package.json b/src/portal/package.json index 675857acc..5dbbd9c3e 100644 --- a/src/portal/package.json +++ b/src/portal/package.json @@ -7,6 +7,8 @@ "start": "ng serve --ssl true --ssl-key ssl/server.key --ssl-cert ssl/server.crt --host 0.0.0.0 --proxy-config proxy.config.json", "lint": "tslint \"src/**/*.ts\"", "lint:lib": "tslint \"lib/**/*.ts\" -e \"lib/dist/**/*\" ", + "lint_fix": "tslint --fix \"src/**/*.ts\"", + "lint:lib_fix": "tslint --fix \"lib/**/*.ts\" -e \"lib/dist/**/*\" ", "test": "ng test --code-coverage", "test:watch": "ng test --code-coverage --watch", "test:debug": "ng test --code-coverage --source-map false", diff --git a/src/portal/src/app/account/account-settings/account-settings-modal.component.spec.ts b/src/portal/src/app/account/account-settings/account-settings-modal.component.spec.ts new file mode 100644 index 000000000..5fc223efe --- /dev/null +++ b/src/portal/src/app/account/account-settings/account-settings-modal.component.spec.ts @@ -0,0 +1,57 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { AccountSettingsModalComponent } from './account-settings-modal.component'; +import { SessionService } from "../../shared/session.service"; +import { MessageHandlerService } from "../../shared/message-handler/message-handler.service"; +import { SearchTriggerService } from "../../base/global-search/search-trigger.service"; +import { AccountSettingsModalService } from './account-settings-modal-service.service'; +import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectorRef } from '@angular/core'; +import { ClarityModule } from "@clr/angular"; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { FormsModule } from '@angular/forms'; + +describe('AccountSettingsModalComponent', () => { + let component: AccountSettingsModalComponent; + let fixture: ComponentFixture; + let fakeSessionService = { + getCurrentUser: function () { + return { has_admin_role: true }; + } + }; + let fakeMessageHandlerService = null; + let fakeSearchTriggerService = null; + let fakeAccountSettingsModalService = null; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AccountSettingsModalComponent], + imports: [ + RouterTestingModule, + ClarityModule, + TranslateModule.forRoot(), + FormsModule + ], + providers: [ + ChangeDetectorRef, + TranslateService, + { provide: SessionService, useValue: fakeSessionService }, + { provide: MessageHandlerService, useValue: fakeMessageHandlerService }, + { provide: SearchTriggerService, useValue: fakeSearchTriggerService }, + { provide: AccountSettingsModalService, useValue: fakeAccountSettingsModalService } + ], + schemas: [ + CUSTOM_ELEMENTS_SCHEMA + ], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AccountSettingsModalComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/account/password-setting/forgot-password/forgot-password.component.spec.ts b/src/portal/src/app/account/password-setting/forgot-password/forgot-password.component.spec.ts new file mode 100644 index 000000000..0cf02cee8 --- /dev/null +++ b/src/portal/src/app/account/password-setting/forgot-password/forgot-password.component.spec.ts @@ -0,0 +1,39 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { FormsModule } from '@angular/forms'; +import { ForgotPasswordComponent } from './forgot-password.component'; +import { ClarityModule } from "@clr/angular"; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { PasswordSettingService } from '../password-setting.service'; + +describe('ForgotPasswordComponent', () => { + let component: ForgotPasswordComponent; + let fixture: ComponentFixture; + let fakePasswordSettingService = null; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ForgotPasswordComponent], + imports: [ + FormsModule, + ClarityModule, + TranslateModule.forRoot() + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + providers: [ + TranslateService, + { provide: PasswordSettingService, useValue: fakePasswordSettingService } + ] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ForgotPasswordComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/account/password-setting/password-setting.component.spec.ts b/src/portal/src/app/account/password-setting/password-setting.component.spec.ts new file mode 100644 index 000000000..a50888ce0 --- /dev/null +++ b/src/portal/src/app/account/password-setting/password-setting.component.spec.ts @@ -0,0 +1,48 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { PasswordSettingService } from './password-setting.service'; +import { SessionService } from '../../shared/session.service'; +import { MessageHandlerService } from '../../shared/message-handler/message-handler.service'; +import { PasswordSettingComponent } from './password-setting.component'; +import { ClarityModule } from "@clr/angular"; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { FormsModule } from '@angular/forms'; +import { InlineAlertComponent } from '../../shared/inline-alert/inline-alert.component'; + +describe('PasswordSettingComponent', () => { + let component: PasswordSettingComponent; + let fixture: ComponentFixture; + let fakePasswordSettingService = null; + let fakeSessionService = null; + let fakeMessageHandlerService = null; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + ClarityModule, + TranslateModule.forRoot(), + FormsModule + ], + declarations: [PasswordSettingComponent, InlineAlertComponent], + providers: [ + TranslateService, + { provide: PasswordSettingService, useValue: fakePasswordSettingService }, + { provide: SessionService, useValue: fakeSessionService }, + { provide: MessageHandlerService, useValue: fakeMessageHandlerService } + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PasswordSettingComponent); + component = fixture.componentInstance; + component.inlineAlert = + TestBed.createComponent(InlineAlertComponent).componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/account/password-setting/password-setting.service.spec.ts b/src/portal/src/app/account/password-setting/password-setting.service.spec.ts new file mode 100644 index 000000000..2a09e18fe --- /dev/null +++ b/src/portal/src/app/account/password-setting/password-setting.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { PasswordSettingService } from './password-setting.service'; + +xdescribe('PasswordSettingService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [PasswordSettingService] + }); + }); + + it('should be created', inject([PasswordSettingService], (service: PasswordSettingService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/account/password-setting/reset-password/reset-password.component.spec.ts b/src/portal/src/app/account/password-setting/reset-password/reset-password.component.spec.ts new file mode 100644 index 000000000..b07c008a7 --- /dev/null +++ b/src/portal/src/app/account/password-setting/reset-password/reset-password.component.spec.ts @@ -0,0 +1,42 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { ResetPasswordComponent } from './reset-password.component'; +import { FormsModule } from '@angular/forms'; +import { PasswordSettingService } from '../password-setting.service'; +import { RouterTestingModule } from '@angular/router/testing'; +import { MessageHandlerService } from '../../../shared/message-handler/message-handler.service'; + +describe('ResetPasswordComponent', () => { + let component: ResetPasswordComponent; + let fixture: ComponentFixture; + let fakePasswordSettingService = null; + let fakeMessageHandlerService = null; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + TranslateModule.forRoot(), + FormsModule, + RouterTestingModule + ], + declarations: [ResetPasswordComponent], + providers: [ + TranslateService, + { provide: PasswordSettingService, useValue: fakePasswordSettingService }, + { provide: MessageHandlerService, useValue: fakeMessageHandlerService }, + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ResetPasswordComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/account/sign-up/sign-up-page.component.spec.ts b/src/portal/src/app/account/sign-up/sign-up-page.component.spec.ts new file mode 100644 index 000000000..1c4f173b8 --- /dev/null +++ b/src/portal/src/app/account/sign-up/sign-up-page.component.spec.ts @@ -0,0 +1,47 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { UserService } from '../../user/user.service'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { MessageService } from '../../global-message/message.service'; +import { RouterTestingModule } from '@angular/router/testing'; +import { SignUpPageComponent } from './sign-up-page.component'; +import { FormsModule } from '@angular/forms'; +import { NewUserFormComponent } from '../../shared/new-user-form/new-user-form.component'; +import { SessionService } from '../../shared/session.service'; + +describe('SignUpPageComponent', () => { + let component: SignUpPageComponent; + let fixture: ComponentFixture; + let fakeUserService = null; + let fakeSessionService = null; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SignUpPageComponent, NewUserFormComponent], + imports: [ + FormsModule, + RouterTestingModule, + TranslateModule.forRoot() + ], + providers: [ + MessageService, + TranslateService, + { provide: UserService, useValue: fakeUserService }, + { provide: SessionService, useValue: fakeSessionService }, + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SignUpPageComponent); + component = fixture.componentInstance; + component.newUserForm = + TestBed.createComponent(NewUserFormComponent).componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/account/sign-up/sign-up.component.spec.ts b/src/portal/src/app/account/sign-up/sign-up.component.spec.ts new file mode 100644 index 000000000..f528eaaf6 --- /dev/null +++ b/src/portal/src/app/account/sign-up/sign-up.component.spec.ts @@ -0,0 +1,45 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ClarityModule } from "@clr/angular"; +import { SignUpComponent } from './sign-up.component'; +import { SessionService } from '../../shared/session.service'; +import { UserService } from '../../user/user.service'; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { NewUserFormComponent } from '../../shared/new-user-form/new-user-form.component'; +import { FormsModule } from '@angular/forms'; + +describe('SignUpComponent', () => { + let component: SignUpComponent; + let fixture: ComponentFixture; + let fakeSessionService = null; + let fakeUserService = null; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SignUpComponent, NewUserFormComponent], + imports: [ + FormsModule, + ClarityModule, + TranslateModule.forRoot() + ], + providers: [ + TranslateService, + { provide: SessionService, useValue: fakeSessionService }, + { provide: UserService, useValue: fakeUserService } + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SignUpComponent); + component = fixture.componentInstance; + component.newUserForm = + TestBed.createComponent(NewUserFormComponent).componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/app-config.service.spec.ts b/src/portal/src/app/app-config.service.spec.ts new file mode 100644 index 000000000..30f8b8cb9 --- /dev/null +++ b/src/portal/src/app/app-config.service.spec.ts @@ -0,0 +1,24 @@ +import { TestBed, inject } from '@angular/core/testing'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { CookieService } from 'ngx-cookie'; +import { AppConfigService } from './app-config.service'; + +describe('AppConfigService', () => { + let fakeCookieService = { + get: function (key) { + return key; + } + }; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [AppConfigService, + { provide: CookieService, useValue: fakeCookieService }] + }); + }); + + it('should be created', inject([AppConfigService], (service: AppConfigService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/app.component.spec.ts b/src/portal/src/app/app.component.spec.ts index f17800048..c43d82641 100644 --- a/src/portal/src/app/app.component.spec.ts +++ b/src/portal/src/app/app.component.spec.ts @@ -13,47 +13,70 @@ // limitations under the License. /* tslint:disable:no-unused-variable */ -// import { TestBed, async, ComponentFixture } from '@angular/core/testing'; -// import { AppComponent } from './app.component'; -// import { HomeComponent } from "./home/home.component"; -// import { AboutComponent } from "./about/about.component"; -// import { ClarityModule } from "@clr/angular"; -// import { ROUTING } from "./app.routing"; -// import { APP_BASE_HREF } from "@angular/common"; +import { TestBed, async, ComponentFixture } from '@angular/core/testing'; +import { Title } from '@angular/platform-browser'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { CookieService } from 'ngx-cookie'; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { SessionService } from './shared/session.service'; +import { AppConfigService } from './app-config.service'; +import { AppComponent } from './app.component'; +import { ClarityModule } from "@clr/angular"; +import { APP_BASE_HREF } from "@angular/common"; -// describe('AppComponent', () => { +describe('AppComponent', () => { + let fixture: ComponentFixture; + let compiled: any; + let fakeCookieService = null; + let fakeSessionService = { + getCurrentUser: function () { + return { has_admin_role: true }; + } + }; + let fakeAppConfigService = { + isIntegrationMode: function () { + return true; + } + }; + let fakeTitle = { + setTitle: function () { + } + }; -// let fixture: ComponentFixture; -// let compiled: any; + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [ + AppComponent + ], + imports: [ + ClarityModule, + TranslateModule.forRoot() + ], + providers: [ + TranslateService, + { provide: APP_BASE_HREF, useValue: '/' }, + { provide: CookieService, useValue: fakeCookieService }, + { provide: SessionService, useValue: fakeSessionService }, + { provide: AppConfigService, useValue: fakeAppConfigService }, + { provide: Title, useValue: fakeTitle }, + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] + }); -// beforeEach(() => { -// TestBed.configureTestingModule({ -// declarations: [ -// AppComponent, -// AboutComponent, -// HomeComponent -// ], -// imports: [ -// ClarityModule, -// ROUTING -// ], -// providers: [{provide: APP_BASE_HREF, useValue: '/'}] -// }); - -// fixture = TestBed.createComponent(AppComponent); -// fixture.detectChanges(); -// compiled = fixture.nativeElement; + fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + compiled = fixture.nativeElement; -// }); + }); -// afterEach(() => { -// fixture.destroy(); -// }); + afterEach(() => { + fixture.destroy(); + }); -// it('should create the app', async(() => { -// expect(compiled).toBeTruthy(); -// })); + it('should create the app', async(() => { + expect(compiled).toBeTruthy(); + })); -// }); +}); diff --git a/src/portal/src/app/base/footer/footer.component.spec.ts b/src/portal/src/app/base/footer/footer.component.spec.ts new file mode 100644 index 000000000..896320aae --- /dev/null +++ b/src/portal/src/app/base/footer/footer.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FooterComponent } from './footer.component'; + +describe('FooterComponent', () => { + let component: FooterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [FooterComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(FooterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/base/global-search/global-search.component.spec.ts b/src/portal/src/app/base/global-search/global-search.component.spec.ts new file mode 100644 index 000000000..118219cc7 --- /dev/null +++ b/src/portal/src/app/base/global-search/global-search.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { GlobalSearchComponent } from './global-search.component'; + +xdescribe('GlobalSearchComponent', () => { + let component: GlobalSearchComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [GlobalSearchComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(GlobalSearchComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/base/global-search/global-search.service.spec.ts b/src/portal/src/app/base/global-search/global-search.service.spec.ts new file mode 100644 index 000000000..24d68e346 --- /dev/null +++ b/src/portal/src/app/base/global-search/global-search.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { GlobalSearchService } from './global-search.service'; + +xdescribe('GlobalSearchService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [GlobalSearchService] + }); + }); + + it('should be created', inject([GlobalSearchService], (service: GlobalSearchService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/base/global-search/search-result.component.spec.ts b/src/portal/src/app/base/global-search/search-result.component.spec.ts new file mode 100644 index 000000000..4cb5d85af --- /dev/null +++ b/src/portal/src/app/base/global-search/search-result.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SearchResultComponent } from './search-result.component'; + +xdescribe('SearchResultComponent', () => { + let component: SearchResultComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SearchResultComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SearchResultComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/base/global-search/search-trigger.service.spec.ts b/src/portal/src/app/base/global-search/search-trigger.service.spec.ts new file mode 100644 index 000000000..c6729c7a4 --- /dev/null +++ b/src/portal/src/app/base/global-search/search-trigger.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { SearchTriggerService } from './search-trigger.service'; + +describe('SearchTriggerService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [SearchTriggerService] + }); + }); + + it('should be created', inject([SearchTriggerService], (service: SearchTriggerService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/base/harbor-shell/harbor-shell.component.spec.ts b/src/portal/src/app/base/harbor-shell/harbor-shell.component.spec.ts new file mode 100644 index 000000000..3fc1813f9 --- /dev/null +++ b/src/portal/src/app/base/harbor-shell/harbor-shell.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HarborShellComponent } from './harbor-shell.component'; + +xdescribe('HarborShellComponent', () => { + let component: HarborShellComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [HarborShellComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HarborShellComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/base/navigator/navigator.component.spec.ts b/src/portal/src/app/base/navigator/navigator.component.spec.ts new file mode 100644 index 000000000..f5cf7ee76 --- /dev/null +++ b/src/portal/src/app/base/navigator/navigator.component.spec.ts @@ -0,0 +1,79 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { SessionService } from '../../shared/session.service'; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { PlatformLocation } from '@angular/common'; +import { NavigatorComponent } from './navigator.component'; +import { RouterTestingModule } from '@angular/router/testing'; +import { CookieService } from 'ngx-cookie'; +import { AppConfigService } from '../../app-config.service'; +import { MessageHandlerService } from '../../shared/message-handler/message-handler.service'; +import { SearchTriggerService } from '../global-search/search-trigger.service'; +import { SkinableConfig } from "../../skinable-config.service"; + +describe('NavigatorComponent', () => { + let component: NavigatorComponent; + let fixture: ComponentFixture; + let fakeSessionService = { + getCurrentUser: function () { + return { + username: 'abc', + has_admin_role: true + }; + } + }; + let fakePlatformLocation = null; + let fakeCookieService = null; + let fakeAppConfigService = { + isIntegrationMode: function () { + return true; + }, + getConfig: function () { + return { + has_ca_root: true, + read_only: false + }; + }, + getAdmiralEndpoint: function () { + + } + }; + let fakeMessageHandlerService = null; + let fakeSearchTriggerService = null; + let fakeSkinableConfig = { + getSkinConfig: function () { + return { projects: "abc" }; + } + }; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + TranslateModule.forRoot(), + RouterTestingModule + ], + declarations: [NavigatorComponent], + providers: [ + TranslateService, + { provide: SessionService, useValue: fakeSessionService }, + { provide: PlatformLocation, useValue: fakePlatformLocation }, + { provide: CookieService, useValue: fakeCookieService }, + { provide: AppConfigService, useValue: fakeAppConfigService }, + { provide: MessageHandlerService, useValue: fakeMessageHandlerService }, + { provide: SearchTriggerService, useValue: fakeSearchTriggerService }, + { provide: SkinableConfig, useValue: fakeSkinableConfig } + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NavigatorComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/config/auth/config-auth.component.spec.ts b/src/portal/src/app/config/auth/config-auth.component.spec.ts new file mode 100644 index 000000000..fcff35681 --- /dev/null +++ b/src/portal/src/app/config/auth/config-auth.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfigurationAuthComponent } from './config-auth.component'; + +xdescribe('ConfigurationAuthComponent', () => { + let component: ConfigurationAuthComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ConfigurationAuthComponent] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfigurationAuthComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/config/config.component.spec.ts b/src/portal/src/app/config/config.component.spec.ts new file mode 100644 index 000000000..bfd24313b --- /dev/null +++ b/src/portal/src/app/config/config.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfigurationComponent } from './config.component'; + +xdescribe('ConfigurationComponent', () => { + let component: ConfigurationComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ConfigurationComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfigurationComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/config/config.service.spec.ts b/src/portal/src/app/config/config.service.spec.ts new file mode 100644 index 000000000..211e5d8c7 --- /dev/null +++ b/src/portal/src/app/config/config.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { ConfigurationService } from './config.service'; + +xdescribe('ConfigService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ConfigurationService] + }); + }); + + it('should be created', inject([ConfigurationService], (service: ConfigurationService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/config/email/config-email.component.spec.ts b/src/portal/src/app/config/email/config-email.component.spec.ts new file mode 100644 index 000000000..384727811 --- /dev/null +++ b/src/portal/src/app/config/email/config-email.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfigurationEmailComponent } from './config-email.component'; + +xdescribe('ConfigurationEmailComponent', () => { + let component: ConfigurationEmailComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ConfigurationEmailComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfigurationEmailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/global-message/message.component.spec.ts b/src/portal/src/app/global-message/message.component.spec.ts new file mode 100644 index 000000000..d665b4de8 --- /dev/null +++ b/src/portal/src/app/global-message/message.component.spec.ts @@ -0,0 +1,42 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { Component, Input, OnInit, OnDestroy, ElementRef } from '@angular/core'; +import { Router } from '@angular/router'; +import { Subscription } from "rxjs"; +import { RouterTestingModule } from '@angular/router/testing'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { ClarityModule } from "@clr/angular"; +import { Message } from './message'; +import { MessageService } from './message.service'; +import { MessageComponent } from './message.component'; + +describe('MessageComponent', () => { + let component: MessageComponent; + let fixture: ComponentFixture; + let fakeElementRef = null; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + ClarityModule, + RouterTestingModule, + TranslateModule.forRoot() + ], + declarations: [MessageComponent], + providers: [ + MessageService, + TranslateService, + {provide: ElementRef, useValue: fakeElementRef} + ] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MessageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/global-message/message.service.spec.ts b/src/portal/src/app/global-message/message.service.spec.ts new file mode 100644 index 000000000..63ecfd8ff --- /dev/null +++ b/src/portal/src/app/global-message/message.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { MessageService } from './message.service'; + +describe('MessageService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [MessageService] + }); + }); + + it('should be created', inject([MessageService], (service: MessageService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/log/audit-log.component.spec.ts b/src/portal/src/app/log/audit-log.component.spec.ts new file mode 100644 index 000000000..301560104 --- /dev/null +++ b/src/portal/src/app/log/audit-log.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AuditLogComponent } from './audit-log.component'; + +xdescribe('AuditLogComponent', () => { + let component: AuditLogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AuditLogComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AuditLogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/log/audit-log.service.spec.ts b/src/portal/src/app/log/audit-log.service.spec.ts new file mode 100644 index 000000000..c81648e7e --- /dev/null +++ b/src/portal/src/app/log/audit-log.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { AuditLogService } from './audit-log.service'; + +xdescribe('AuditLogService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [AuditLogService] + }); + }); + + it('should be created', inject([AuditLogService], (service: AuditLogService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/log/log-page.component.spec.ts b/src/portal/src/app/log/log-page.component.spec.ts new file mode 100644 index 000000000..31c83f8d7 --- /dev/null +++ b/src/portal/src/app/log/log-page.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LogPageComponent } from './log-page.component'; + +xdescribe('LogPageComponent', () => { + let component: LogPageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [LogPageComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LogPageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/create-project/create-project.component.spec.ts b/src/portal/src/app/project/create-project/create-project.component.spec.ts new file mode 100644 index 000000000..4f2621f4e --- /dev/null +++ b/src/portal/src/app/project/create-project/create-project.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CreateProjectComponent } from './create-project.component'; + +xdescribe('CreateProjectComponent', () => { + let component: CreateProjectComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [CreateProjectComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CreateProjectComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail.component.spec.ts b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail.component.spec.ts index 3adc62fbb..761caeb92 100644 --- a/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail.component.spec.ts +++ b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail.component.spec.ts @@ -7,7 +7,7 @@ import { SessionService } from './../../../shared/session.service'; import { of } from 'rxjs'; import { HelmChartDetailComponent } from './chart-detail.component'; -describe('ChartDetailComponent', () => { +xdescribe('ChartDetailComponent', () => { let component: HelmChartDetailComponent; let fixture: ComponentFixture; let fakeRouter = null; diff --git a/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-dependency.component.spec.ts b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-dependency.component.spec.ts new file mode 100644 index 000000000..121fae34f --- /dev/null +++ b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-dependency.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ChartDetailDependencyComponent } from './chart-detail-dependency.component'; + +xdescribe('ChartDetailDependencyComponent', () => { + let component: ChartDetailDependencyComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ChartDetailDependencyComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ChartDetailDependencyComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-summary.component.spec.ts b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-summary.component.spec.ts new file mode 100644 index 000000000..1ee354172 --- /dev/null +++ b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-summary.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ChartDetailSummaryComponent } from './chart-detail-summary.component'; + +xdescribe('ChartDetailSummaryComponent', () => { + let component: ChartDetailSummaryComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ChartDetailSummaryComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ChartDetailSummaryComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-value.component.spec.ts b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-value.component.spec.ts new file mode 100644 index 000000000..f69977d24 --- /dev/null +++ b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail-value.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ChartDetailValueComponent } from './chart-detail-value.component'; + +xdescribe('ChartDetailValueComponent', () => { + let component: ChartDetailValueComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ChartDetailValueComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ChartDetailValueComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.spec.ts b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.spec.ts new file mode 100644 index 000000000..2e3433b0b --- /dev/null +++ b/src/portal/src/app/project/helm-chart/helm-chart-detail/chart-detail/chart-detail.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ChartDetailComponent } from './chart-detail.component'; + +xdescribe('ChartDetailComponent', () => { + let component: ChartDetailComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ChartDetailComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ChartDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/helm-chart/helm-chart.service.spec.ts b/src/portal/src/app/project/helm-chart/helm-chart.service.spec.ts new file mode 100644 index 000000000..3bf486f52 --- /dev/null +++ b/src/portal/src/app/project/helm-chart/helm-chart.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { HelmChartService } from './helm-chart.service'; + +describe('HelmChartService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [HelmChartService] + }); + }); + + it('should be created', inject([HelmChartService], (service: HelmChartService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/project/helm-chart/label-filter/label-filter.component.spec.ts b/src/portal/src/app/project/helm-chart/label-filter/label-filter.component.spec.ts new file mode 100644 index 000000000..8330be2dc --- /dev/null +++ b/src/portal/src/app/project/helm-chart/label-filter/label-filter.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LabelFilterComponent } from './label-filter.component'; + +xdescribe('LabelFilterComponent', () => { + let component: LabelFilterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [LabelFilterComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LabelFilterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/helm-chart/label-marker/label-marker.component.spec.ts b/src/portal/src/app/project/helm-chart/label-marker/label-marker.component.spec.ts new file mode 100644 index 000000000..23ef312bc --- /dev/null +++ b/src/portal/src/app/project/helm-chart/label-marker/label-marker.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { LabelMarkerComponent } from './label-marker.component'; + +xdescribe('LabelMarkerComponent', () => { + let component: LabelMarkerComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [LabelMarkerComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(LabelMarkerComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/helm-chart/list-chart-versions/helm-chart-versions-detail/helm-chart-version.component.spec.ts b/src/portal/src/app/project/helm-chart/list-chart-versions/helm-chart-versions-detail/helm-chart-version.component.spec.ts new file mode 100644 index 000000000..7755c5f7c --- /dev/null +++ b/src/portal/src/app/project/helm-chart/list-chart-versions/helm-chart-versions-detail/helm-chart-version.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ChartVersionComponent } from './helm-chart-version.component'; + +xdescribe('ChartVersionComponent', () => { + let component: ChartVersionComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ChartVersionComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ChartVersionComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/helm-chart/list-charts-detail/helm-chart.component.spec.ts b/src/portal/src/app/project/helm-chart/list-charts-detail/helm-chart.component.spec.ts new file mode 100644 index 000000000..997c6595b --- /dev/null +++ b/src/portal/src/app/project/helm-chart/list-charts-detail/helm-chart.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HelmChartComponent } from './helm-chart.component'; + +xdescribe('HelmChartComponent', () => { + let component: HelmChartComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [HelmChartComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HelmChartComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/list-project/list-project.component.spec.ts b/src/portal/src/app/project/list-project/list-project.component.spec.ts new file mode 100644 index 000000000..096eb06f9 --- /dev/null +++ b/src/portal/src/app/project/list-project/list-project.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ListProjectComponent } from './list-project.component'; + +xdescribe('ListProjectComponent', () => { + let component: ListProjectComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ListProjectComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ListProjectComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/member/add-member/add-member.component.spec.ts b/src/portal/src/app/project/member/add-member/add-member.component.spec.ts new file mode 100644 index 000000000..0407128a6 --- /dev/null +++ b/src/portal/src/app/project/member/add-member/add-member.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AddMemberComponent } from './add-member.component'; + +xdescribe('AddMemberComponent', () => { + let component: AddMemberComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AddMemberComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AddMemberComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/member/member.component.spec.ts b/src/portal/src/app/project/member/member.component.spec.ts new file mode 100644 index 000000000..762b114db --- /dev/null +++ b/src/portal/src/app/project/member/member.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MemberComponent } from './member.component'; + +xdescribe('MemberComponent', () => { + let component: MemberComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [MemberComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MemberComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/member/member.service.spec.ts b/src/portal/src/app/project/member/member.service.spec.ts new file mode 100644 index 000000000..954824d4d --- /dev/null +++ b/src/portal/src/app/project/member/member.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { MemberService } from './member.service'; + +xdescribe('MemberService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [MemberService] + }); + }); + + it('should be created', inject([MemberService], (service: MemberService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/project/project-detail/project-detail.component.spec.ts b/src/portal/src/app/project/project-detail/project-detail.component.spec.ts new file mode 100644 index 000000000..d9c06bc20 --- /dev/null +++ b/src/portal/src/app/project/project-detail/project-detail.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProjectDetailComponent } from './project-detail.component'; + +xdescribe('ProjectDetailComponent', () => { + let component: ProjectDetailComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ProjectDetailComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ProjectDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/project-label/project-label.component.spec.ts b/src/portal/src/app/project/project-label/project-label.component.spec.ts new file mode 100644 index 000000000..d495019a0 --- /dev/null +++ b/src/portal/src/app/project/project-label/project-label.component.spec.ts @@ -0,0 +1,59 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { Router, ActivatedRoute } from '@angular/router'; +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { of } from 'rxjs'; +import { ProjectLabelComponent } from './project-label.component'; +import { UserPermissionService, ErrorHandler } from "@harbor/ui"; +import { SessionService } from '../../shared/session.service'; + +describe('ProjectLabelComponent', () => { + let component: ProjectLabelComponent; + let fixture: ComponentFixture; + let fakeRouter = null; + const fakeUserPermissionService = { + getPermission() { + return of(true); + } + }; + const fakeSessionService = { + getCurrentUser: function () { + return { has_admin_role: true }; + } + }; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ProjectLabelComponent], + schemas: [ + CUSTOM_ELEMENTS_SCHEMA + ], + providers: [ + ErrorHandler, + { provide: Router, useValue: fakeRouter }, + { + provide: ActivatedRoute, useValue: { + snapshot: { + parent: { + params: { + id: 1 + } + } + } + } + }, + { provide: UserPermissionService, useValue: fakeUserPermissionService }, + { provide: SessionService, useValue: fakeSessionService } + ] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ProjectLabelComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/project-routing-resolver.service.spec.ts b/src/portal/src/app/project/project-routing-resolver.service.spec.ts new file mode 100644 index 000000000..384bb2652 --- /dev/null +++ b/src/portal/src/app/project/project-routing-resolver.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { ProjectRoutingResolver } from './project-routing-resolver.service'; + +xdescribe('ProjectRoutingResolverService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ProjectRoutingResolver] + }); + }); + + it('should be created', inject([ProjectRoutingResolver], (service: ProjectRoutingResolver) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/project/project.component.spec.ts b/src/portal/src/app/project/project.component.spec.ts new file mode 100644 index 000000000..aa3c18194 --- /dev/null +++ b/src/portal/src/app/project/project.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ProjectComponent } from './project.component'; + +xdescribe('ProjectComponent', () => { + let component: ProjectComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ProjectComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ProjectComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/robot-account/robot-account.service.spec.ts b/src/portal/src/app/project/robot-account/robot-account.service.spec.ts new file mode 100644 index 000000000..fa55147fa --- /dev/null +++ b/src/portal/src/app/project/robot-account/robot-account.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { RobotService } from './robot-account.service'; + +xdescribe('RobotService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [RobotService] + }); + }); + + it('should be created', inject([RobotService], (service: RobotService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/project/tag-retention/add-rule/add-rule.component.spec.ts b/src/portal/src/app/project/tag-retention/add-rule/add-rule.component.spec.ts new file mode 100644 index 000000000..c4b8efadd --- /dev/null +++ b/src/portal/src/app/project/tag-retention/add-rule/add-rule.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AddRuleComponent } from './add-rule.component'; + +xdescribe('AddRuleComponent', () => { + let component: AddRuleComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AddRuleComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AddRuleComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/tag-retention/tag-retention.component.spec.ts b/src/portal/src/app/project/tag-retention/tag-retention.component.spec.ts new file mode 100644 index 000000000..f18ce1e27 --- /dev/null +++ b/src/portal/src/app/project/tag-retention/tag-retention.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TagRetentionComponent } from './tag-retention.component'; + +xdescribe('TagRetentionComponent', () => { + let component: TagRetentionComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [TagRetentionComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TagRetentionComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/tag-retention/tag-retention.service.spec.ts b/src/portal/src/app/project/tag-retention/tag-retention.service.spec.ts new file mode 100644 index 000000000..f2197759d --- /dev/null +++ b/src/portal/src/app/project/tag-retention/tag-retention.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { TagRetentionService } from './tag-retention.service'; + +xdescribe('TagRetentionService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [TagRetentionService] + }); + }); + + it('should be created', inject([TagRetentionService], (service: TagRetentionService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/project/webhook/add-webhook-form/add-webhook-form.component.spec.ts b/src/portal/src/app/project/webhook/add-webhook-form/add-webhook-form.component.spec.ts new file mode 100644 index 000000000..2323aafe8 --- /dev/null +++ b/src/portal/src/app/project/webhook/add-webhook-form/add-webhook-form.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AddWebhookFormComponent } from './add-webhook-form.component'; + +xdescribe('AddWebhookFormComponent', () => { + let component: AddWebhookFormComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AddWebhookFormComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AddWebhookFormComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/webhook/add-webhook/add-webhook.component.spec.ts b/src/portal/src/app/project/webhook/add-webhook/add-webhook.component.spec.ts new file mode 100644 index 000000000..a08c665aa --- /dev/null +++ b/src/portal/src/app/project/webhook/add-webhook/add-webhook.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AddWebhookComponent } from './add-webhook.component'; + +xdescribe('AddWebhookComponent', () => { + let component: AddWebhookComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AddWebhookComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AddWebhookComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/webhook/webhook.component.spec.ts b/src/portal/src/app/project/webhook/webhook.component.spec.ts new file mode 100644 index 000000000..c804fe1e1 --- /dev/null +++ b/src/portal/src/app/project/webhook/webhook.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { WebhookComponent } from './webhook.component'; + +xdescribe('WebhookComponent', () => { + let component: WebhookComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [WebhookComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(WebhookComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/project/webhook/webhook.service.spec.ts b/src/portal/src/app/project/webhook/webhook.service.spec.ts new file mode 100644 index 000000000..3d6287167 --- /dev/null +++ b/src/portal/src/app/project/webhook/webhook.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { WebhookService } from './webhook.service'; + +xdescribe('WebhookService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [WebhookService] + }); + }); + + it('should be created', inject([WebhookService], (service: WebhookService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/replication/destination/destination-page.component.spec.ts b/src/portal/src/app/replication/destination/destination-page.component.spec.ts new file mode 100644 index 000000000..e35e60a38 --- /dev/null +++ b/src/portal/src/app/replication/destination/destination-page.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { DestinationPageComponent } from './destination-page.component'; + +xdescribe('DestinationPageComponent', () => { + let component: DestinationPageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [DestinationPageComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(DestinationPageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/replication/replication-management/replication-management.component.spec.ts b/src/portal/src/app/replication/replication-management/replication-management.component.spec.ts new file mode 100644 index 000000000..162f841ba --- /dev/null +++ b/src/portal/src/app/replication/replication-management/replication-management.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReplicationManagementComponent } from './replication-management.component'; + +xdescribe('ReplicationManagementComponent', () => { + let component: ReplicationManagementComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ReplicationManagementComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReplicationManagementComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/replication/replication-page.component.spec.ts b/src/portal/src/app/replication/replication-page.component.spec.ts new file mode 100644 index 000000000..fe651672f --- /dev/null +++ b/src/portal/src/app/replication/replication-page.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ReplicationPageComponent } from './replication-page.component'; + +xdescribe('ReplicationPageComponent', () => { + let component: ReplicationPageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ReplicationPageComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ReplicationPageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/replication/total-replication/total-replication-page.component.spec.ts b/src/portal/src/app/replication/total-replication/total-replication-page.component.spec.ts new file mode 100644 index 000000000..8172fd4cc --- /dev/null +++ b/src/portal/src/app/replication/total-replication/total-replication-page.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TotalReplicationPageComponent } from './total-replication-page.component'; + +xdescribe('TotalReplicationPageComponent', () => { + let component: TotalReplicationPageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [TotalReplicationPageComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TotalReplicationPageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/repository/repository-page.component.spec.ts b/src/portal/src/app/repository/repository-page.component.spec.ts new file mode 100644 index 000000000..74a75445c --- /dev/null +++ b/src/portal/src/app/repository/repository-page.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { RepositoryPageComponent } from './repository-page.component'; + +xdescribe('RepositoryPageComponent', () => { + let component: RepositoryPageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [RepositoryPageComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(RepositoryPageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/repository/tag-detail/tag-detail-page.component.spec.ts b/src/portal/src/app/repository/tag-detail/tag-detail-page.component.spec.ts new file mode 100644 index 000000000..cf96cd8c0 --- /dev/null +++ b/src/portal/src/app/repository/tag-detail/tag-detail-page.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TagDetailPageComponent } from './tag-detail-page.component'; + +xdescribe('TagDetailPageComponent', () => { + let component: TagDetailPageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [TagDetailPageComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TagDetailPageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/repository/tag-repository/tag-repository.component.spec.ts b/src/portal/src/app/repository/tag-repository/tag-repository.component.spec.ts new file mode 100644 index 000000000..8f52c11c3 --- /dev/null +++ b/src/portal/src/app/repository/tag-repository/tag-repository.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TagRepositoryComponent } from './tag-repository.component'; + +xdescribe('TagRepositoryComponent', () => { + let component: TagRepositoryComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [TagRepositoryComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TagRepositoryComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/repository/top-repo/top-repo.component.spec.ts b/src/portal/src/app/repository/top-repo/top-repo.component.spec.ts new file mode 100644 index 000000000..303282e7f --- /dev/null +++ b/src/portal/src/app/repository/top-repo/top-repo.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TopRepoComponent } from './top-repo.component'; + +xdescribe('TopRepoComponent', () => { + let component: TopRepoComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [TopRepoComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TopRepoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/repository/top-repo/top-repository.service.spec.ts b/src/portal/src/app/repository/top-repo/top-repository.service.spec.ts new file mode 100644 index 000000000..4a082a98f --- /dev/null +++ b/src/portal/src/app/repository/top-repo/top-repository.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { TopRepoService } from './top-repository.service'; + +xdescribe('TopRepoService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [TopRepoService] + }); + }); + + it('should be created', inject([TopRepoService], (service: TopRepoService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/shared/about-dialog/about-dialog.component.spec.ts b/src/portal/src/app/shared/about-dialog/about-dialog.component.spec.ts new file mode 100644 index 000000000..9820e4225 --- /dev/null +++ b/src/portal/src/app/shared/about-dialog/about-dialog.component.spec.ts @@ -0,0 +1,50 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { TranslateModule, TranslateService } from "@ngx-translate/core"; +import { AppConfigService } from '../../app-config.service'; +import { SkinableConfig } from "../../skinable-config.service"; +import { AboutDialogComponent } from './about-dialog.component'; +import { ClarityModule } from "@clr/angular"; + +describe('AboutDialogComponent', () => { + let component: AboutDialogComponent; + let fixture: ComponentFixture; + let fakeAppConfigService = { + getConfig: function() { + return { + harbor_version: '1.10' + }; + } + }; + let fakeSkinableConfig = { + getProject: function () { + return { + introduction: {} + }; + } + }; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AboutDialogComponent], + imports: [ + TranslateModule.forRoot(), + ClarityModule + ], + providers: [ + TranslateService, + { provide: AppConfigService, useValue: fakeAppConfigService }, + { provide: SkinableConfig, useValue: fakeSkinableConfig } + ] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AboutDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/about-dialog/about-dialog.component.ts b/src/portal/src/app/shared/about-dialog/about-dialog.component.ts index 3ddc59cfc..4cb76ac94 100644 --- a/src/portal/src/app/shared/about-dialog/about-dialog.component.ts +++ b/src/portal/src/app/shared/about-dialog/about-dialog.component.ts @@ -11,11 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -import {Component, OnInit} from '@angular/core'; -import {TranslateService} from "@ngx-translate/core"; +import { Component, OnInit } from '@angular/core'; +import { TranslateService } from "@ngx-translate/core"; import { AppConfigService } from '../../app-config.service'; -import {SkinableConfig} from "../../skinable-config.service"; +import { SkinableConfig } from "../../skinable-config.service"; @Component({ selector: 'about-dialog', @@ -26,11 +26,11 @@ export class AboutDialogComponent implements OnInit { opened: boolean = false; build: string = "4276418"; customIntroduction: string; - customName: {[key: string]: any }; + customName: { [key: string]: any }; constructor(private appConfigService: AppConfigService, - private translate: TranslateService, - private skinableConfig: SkinableConfig) { + private translate: TranslateService, + private skinableConfig: SkinableConfig) { } ngOnInit(): void { diff --git a/src/portal/src/app/shared/confirmation-dialog/confirmation-dialog.component.spec.ts b/src/portal/src/app/shared/confirmation-dialog/confirmation-dialog.component.spec.ts new file mode 100644 index 000000000..212364d8a --- /dev/null +++ b/src/portal/src/app/shared/confirmation-dialog/confirmation-dialog.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfirmationDialogComponent } from './confirmation-dialog.component'; + +xdescribe('ConfirmationDialogComponent', () => { + let component: ConfirmationDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ConfirmationDialogComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfirmationDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/confirmation-dialog/confirmation-dialog.service.spec.ts b/src/portal/src/app/shared/confirmation-dialog/confirmation-dialog.service.spec.ts new file mode 100644 index 000000000..72128f0ad --- /dev/null +++ b/src/portal/src/app/shared/confirmation-dialog/confirmation-dialog.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { ConfirmationDialogService } from './confirmation-dialog.service'; + +describe('ConfirmationDialogService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ConfirmationDialogService] + }); + }); + + it('should be created', inject([ConfirmationDialogService], (service: ConfirmationDialogService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/shared/date-validator.directive.spec.ts b/src/portal/src/app/shared/date-validator.directive.spec.ts new file mode 100644 index 000000000..18742f989 --- /dev/null +++ b/src/portal/src/app/shared/date-validator.directive.spec.ts @@ -0,0 +1,8 @@ +import { DateValidatorDirective } from './date-validator.directive'; + +describe('DateValidatorDirective', () => { + it('should create an instance', () => { + const directive = new DateValidatorDirective(); + expect(directive).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/gauge/gauge.component.spec.ts b/src/portal/src/app/shared/gauge/gauge.component.spec.ts new file mode 100644 index 000000000..7b7765c51 --- /dev/null +++ b/src/portal/src/app/shared/gauge/gauge.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { GaugeComponent } from './gauge.component'; + +xdescribe('GaugeComponent', () => { + let component: GaugeComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [GaugeComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(GaugeComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/inline-alert/inline-alert.component.spec.ts b/src/portal/src/app/shared/inline-alert/inline-alert.component.spec.ts new file mode 100644 index 000000000..19a38e1a9 --- /dev/null +++ b/src/portal/src/app/shared/inline-alert/inline-alert.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { InlineAlertComponent } from './inline-alert.component'; + +xdescribe('InlineAlertComponent', () => { + let component: InlineAlertComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [InlineAlertComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(InlineAlertComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/list-chart-version-ro/list-chart-version-ro.component.spec.ts b/src/portal/src/app/shared/list-chart-version-ro/list-chart-version-ro.component.spec.ts new file mode 100644 index 000000000..1f158a79f --- /dev/null +++ b/src/portal/src/app/shared/list-chart-version-ro/list-chart-version-ro.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ListChartVersionRoComponent } from './list-chart-version-ro.component'; + +xdescribe('ListChartVersionRoComponent', () => { + let component: ListChartVersionRoComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ListChartVersionRoComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ListChartVersionRoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/list-project-ro/list-project-ro.component.spec.ts b/src/portal/src/app/shared/list-project-ro/list-project-ro.component.spec.ts new file mode 100644 index 000000000..ed1cc45a8 --- /dev/null +++ b/src/portal/src/app/shared/list-project-ro/list-project-ro.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ListProjectROComponent } from './list-project-ro.component'; + +xdescribe('ListProjectROComponent', () => { + let component: ListProjectROComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ListProjectROComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ListProjectROComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/list-repository-ro/list-repository-ro.component.spec.ts b/src/portal/src/app/shared/list-repository-ro/list-repository-ro.component.spec.ts new file mode 100644 index 000000000..f8fcd98a5 --- /dev/null +++ b/src/portal/src/app/shared/list-repository-ro/list-repository-ro.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ListRepositoryROComponent } from './list-repository-ro.component'; + +xdescribe('ListRepositoryRoComponent', () => { + let component: ListRepositoryROComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ListRepositoryROComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ListRepositoryROComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/max-length-ext.directive.spec.ts b/src/portal/src/app/shared/max-length-ext.directive.spec.ts new file mode 100644 index 000000000..f1ff2cd67 --- /dev/null +++ b/src/portal/src/app/shared/max-length-ext.directive.spec.ts @@ -0,0 +1,8 @@ +import { MaxLengthExtValidatorDirective } from './max-length-ext.directive'; + +describe('MaxLengthExtValidatorDirective', () => { + it('should create an instance', () => { + const directive = new MaxLengthExtValidatorDirective(); + expect(directive).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/message-handler/message-handler.service.spec.ts b/src/portal/src/app/shared/message-handler/message-handler.service.spec.ts new file mode 100644 index 000000000..59bfab546 --- /dev/null +++ b/src/portal/src/app/shared/message-handler/message-handler.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { MessageHandlerService } from './message-handler.service'; + +xdescribe('MessageHandlerService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [MessageHandlerService] + }); + }); + + it('should be created', inject([MessageHandlerService], (service: MessageHandlerService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/shared/new-user-form/new-user-form.component.spec.ts b/src/portal/src/app/shared/new-user-form/new-user-form.component.spec.ts new file mode 100644 index 000000000..7023c5ac8 --- /dev/null +++ b/src/portal/src/app/shared/new-user-form/new-user-form.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NewUserFormComponent } from './new-user-form.component'; + +xdescribe('NewUserFormComponent', () => { + let component: NewUserFormComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [NewUserFormComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NewUserFormComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/not-found/not-found.component.spec.ts b/src/portal/src/app/shared/not-found/not-found.component.spec.ts new file mode 100644 index 000000000..591486567 --- /dev/null +++ b/src/portal/src/app/shared/not-found/not-found.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PageNotFoundComponent } from './not-found.component'; + +xdescribe('PageNotFoundComponent', () => { + let component: PageNotFoundComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [PageNotFoundComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PageNotFoundComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/port.directive.spec.ts b/src/portal/src/app/shared/port.directive.spec.ts new file mode 100644 index 000000000..91da2fb27 --- /dev/null +++ b/src/portal/src/app/shared/port.directive.spec.ts @@ -0,0 +1,8 @@ +import { PortValidatorDirective } from './port.directive'; + +describe('PortValidatorDirective', () => { + it('should create an instance', () => { + const directive = new PortValidatorDirective(); + expect(directive).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/route/auth-user-activate.service.spec.ts b/src/portal/src/app/shared/route/auth-user-activate.service.spec.ts new file mode 100644 index 000000000..cb5919164 --- /dev/null +++ b/src/portal/src/app/shared/route/auth-user-activate.service.spec.ts @@ -0,0 +1,40 @@ +import { TestBed, inject } from '@angular/core/testing'; +import { + CanActivate, Router, + ActivatedRouteSnapshot, + RouterStateSnapshot, + CanActivateChild, + NavigationExtras +} from '@angular/router'; +import { RouterTestingModule } from '@angular/router/testing'; +import { SessionService } from '../../shared/session.service'; +import { AppConfigService } from '../../app-config.service'; +import { MessageHandlerService } from '../message-handler/message-handler.service'; +import { SearchTriggerService } from '../../base/global-search/search-trigger.service'; +import { AuthCheckGuard } from './auth-user-activate.service'; + +describe('AuthCheckGuard', () => { + const fakeSessionService = null; + const fakeAppConfigService = null; + const fakeMessageHandlerService = null; + const fakeSearchTriggerService = null; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + providers: [ + AuthCheckGuard, + { provide: SessionService, useValue: fakeSessionService }, + { provide: AppConfigService, useValue: fakeAppConfigService }, + { provide: MessageHandlerService, useValue: fakeMessageHandlerService }, + { provide: SearchTriggerService, useValue: fakeSearchTriggerService }, + ] + }); + }); + + it('should be created', inject([AuthCheckGuard], (service: AuthCheckGuard) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/shared/route/leaving-repository-deactivate.service.spec.ts b/src/portal/src/app/shared/route/leaving-repository-deactivate.service.spec.ts new file mode 100644 index 000000000..60f5d8a9d --- /dev/null +++ b/src/portal/src/app/shared/route/leaving-repository-deactivate.service.spec.ts @@ -0,0 +1,29 @@ +import { TestBed, inject } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { LeavingRepositoryRouteDeactivate } from './leaving-repository-deactivate.service'; +import { ConfirmationDialogService } from '../confirmation-dialog/confirmation-dialog.service'; +import { of } from 'rxjs'; + +describe('LeavingRepositoryRouteDeactivate', () => { + let fakeConfirmationDialogService = { + confirmationConfirm$: of({ + state: 1, + source: 2 + }) + }; + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + providers: [ + LeavingRepositoryRouteDeactivate, + { provide: ConfirmationDialogService, useValue: fakeConfirmationDialogService } + ] + }); + }); + + it('should be created', inject([LeavingRepositoryRouteDeactivate], (service: LeavingRepositoryRouteDeactivate) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/shared/route/member-guard-activate.service.spec.ts b/src/portal/src/app/shared/route/member-guard-activate.service.spec.ts new file mode 100644 index 000000000..2eb2849f1 --- /dev/null +++ b/src/portal/src/app/shared/route/member-guard-activate.service.spec.ts @@ -0,0 +1,28 @@ +import { TestBed, async, inject } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { SessionService } from '../../shared/session.service'; +import { ProjectService } from '@harbor/ui'; +import { MemberGuard } from './member-guard-activate.service'; + +describe('MemberGuard', () => { + const fakeSessionService = null; + const fakeProjectService = null; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + providers: [ + MemberGuard, + { provide: SessionService, useValue: fakeSessionService }, + { provide: ProjectService, useValue: fakeProjectService }, + ] + }); + }); + + it('should ...', inject([MemberGuard], (guard: MemberGuard) => { + expect(guard).toBeTruthy(); + })); +}); + diff --git a/src/portal/src/app/shared/route/member-guard-activate.service.ts b/src/portal/src/app/shared/route/member-guard-activate.service.ts index 2d823b12f..e6f504f00 100644 --- a/src/portal/src/app/shared/route/member-guard-activate.service.ts +++ b/src/portal/src/app/shared/route/member-guard-activate.service.ts @@ -39,8 +39,7 @@ export class MemberGuard implements CanActivate, CanActivateChild { this.sessionService.retrieveUser() .subscribe(() => { this.checkMemberStatus(state.url, projectId).subscribe((res) => observer.next(res)); - } - , error => { + }, error => { this.router.navigate([CommonRoutes.HARBOR_DEFAULT]); observer.next(false); }); diff --git a/src/portal/src/app/shared/route/member-permission-guard-activate.service.spec.ts b/src/portal/src/app/shared/route/member-permission-guard-activate.service.spec.ts new file mode 100644 index 000000000..74a5735eb --- /dev/null +++ b/src/portal/src/app/shared/route/member-permission-guard-activate.service.spec.ts @@ -0,0 +1,33 @@ +import { TestBed, async, inject } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { + UserPermissionService, + ErrorHandler +} from "@harbor/ui"; +import { MemberPermissionGuard } from './member-permission-guard-activate.service'; +import { of } from 'rxjs'; + +describe('MemberPermissionGuardActivateServiceGuard', () => { + const fakeUserPermissionService = { + getPermission() { + return of(true); + } + }; + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + providers: [ + ErrorHandler, + MemberPermissionGuard, + { provide: UserPermissionService, useValue: fakeUserPermissionService }, + ] + }); + }); + + it('should ...', inject([MemberPermissionGuard], (guard: MemberPermissionGuard) => { + expect(guard).toBeTruthy(); + })); +}); + diff --git a/src/portal/src/app/shared/route/mode-guard-activate.service.spec.ts b/src/portal/src/app/shared/route/mode-guard-activate.service.spec.ts new file mode 100644 index 000000000..a455d8c8e --- /dev/null +++ b/src/portal/src/app/shared/route/mode-guard-activate.service.spec.ts @@ -0,0 +1,24 @@ +import { TestBed, async, inject } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { ModeGuard } from './mode-guard-activate.service'; +import { AppConfigService } from '../../app-config.service'; + +describe('ModeGuardActivateServiceGuard', () => { + const fakeAppConfigService = null; + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + providers: [ + ModeGuard, + { provide: AppConfigService, useValue: fakeAppConfigService }, + ] + }); + }); + + it('should ...', inject([ModeGuard], (guard: ModeGuard) => { + expect(guard).toBeTruthy(); + })); +}); + diff --git a/src/portal/src/app/shared/route/oidc-guard-active.service.spec.ts b/src/portal/src/app/shared/route/oidc-guard-active.service.spec.ts new file mode 100644 index 000000000..eca22226d --- /dev/null +++ b/src/portal/src/app/shared/route/oidc-guard-active.service.spec.ts @@ -0,0 +1,32 @@ +import { TestBed, async, inject } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { OidcGuard } from './oidc-guard-active.service'; +import { AppConfigService } from '../../app-config.service'; +import { UserPermissionService } from '@harbor/ui'; +import { of } from 'rxjs'; + +describe('OidcGuard', () => { + const fakeAppConfigService = null; + const fakeUserPermissionService = { + getPermission() { + return of(true); + } + }; + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + providers: [ + OidcGuard, + { provide: AppConfigService, useValue: fakeAppConfigService }, + { provide: UserPermissionService, useValue: fakeUserPermissionService }, + ] + }); + }); + + it('should ...', inject([OidcGuard], (guard: OidcGuard) => { + expect(guard).toBeTruthy(); + })); +}); + diff --git a/src/portal/src/app/shared/route/sign-in-guard-activate.service.spec.ts b/src/portal/src/app/shared/route/sign-in-guard-activate.service.spec.ts new file mode 100644 index 000000000..da8def010 --- /dev/null +++ b/src/portal/src/app/shared/route/sign-in-guard-activate.service.spec.ts @@ -0,0 +1,33 @@ +import { TestBed, async, inject } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { SignInGuard } from './sign-in-guard-activate.service'; +import { SessionService } from '../../shared/session.service'; +import { UserPermissionService } from '@harbor/ui'; +import { of } from 'rxjs'; + +describe('SignInGuard', () => { + const fakeUserPermissionService = { + getPermission() { + return of(true); + } + }; + const fakeSessionService = null; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + providers: [ + SignInGuard, + { provide: UserPermissionService, useValue: fakeUserPermissionService }, + { provide: SessionService, useValue: fakeSessionService }, + ] + }); + }); + + it('should ...', inject([SignInGuard], (guard: SignInGuard) => { + expect(guard).toBeTruthy(); + })); +}); + diff --git a/src/portal/src/app/shared/route/system-admin-activate.service.spec.ts b/src/portal/src/app/shared/route/system-admin-activate.service.spec.ts new file mode 100644 index 000000000..04048d9d7 --- /dev/null +++ b/src/portal/src/app/shared/route/system-admin-activate.service.spec.ts @@ -0,0 +1,26 @@ +import { TestBed, inject } from '@angular/core/testing'; +import { RouterTestingModule } from '@angular/router/testing'; +import { SystemAdminGuard } from './system-admin-activate.service'; +import { AppConfigService } from '../../app-config.service'; +import { SessionService } from '../../shared/session.service'; + +describe('SystemAdminGuard', () => { + const fakeAppConfigService = null; + const fakeSessionService = null; + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + RouterTestingModule + ], + providers: [ + SystemAdminGuard, + { provide: AppConfigService, useValue: fakeAppConfigService }, + { provide: SessionService, useValue: fakeSessionService } + ] + }); + }); + + it('should be created', inject([SystemAdminGuard], (service: SystemAdminGuard) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/shared/session.service.spec.ts b/src/portal/src/app/shared/session.service.spec.ts new file mode 100644 index 000000000..15447384c --- /dev/null +++ b/src/portal/src/app/shared/session.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { SessionService } from './session.service'; + +xdescribe('SessionService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [SessionService] + }); + }); + + it('should be created', inject([SessionService], (service: SessionService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/shared/statictics/statistic-handler.service.spec.ts b/src/portal/src/app/shared/statictics/statistic-handler.service.spec.ts new file mode 100644 index 000000000..dfc7e05f2 --- /dev/null +++ b/src/portal/src/app/shared/statictics/statistic-handler.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { StatisticHandler } from './statistic-handler.service'; + +describe('StatisticHandlerService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [StatisticHandler] + }); + }); + + it('should be created', inject([StatisticHandler], (service: StatisticHandler) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/shared/statictics/statistics-panel.component.spec.ts b/src/portal/src/app/shared/statictics/statistics-panel.component.spec.ts new file mode 100644 index 000000000..477e0b4ff --- /dev/null +++ b/src/portal/src/app/shared/statictics/statistics-panel.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { StatisticsPanelComponent } from './statistics-panel.component'; + +xdescribe('StatisticsPanelComponent', () => { + let component: StatisticsPanelComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [StatisticsPanelComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(StatisticsPanelComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/statictics/statistics.component.spec.ts b/src/portal/src/app/shared/statictics/statistics.component.spec.ts new file mode 100644 index 000000000..e3d6db3c9 --- /dev/null +++ b/src/portal/src/app/shared/statictics/statistics.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { StatisticsComponent } from './statistics.component'; + +describe('StatisticsComponent', () => { + let component: StatisticsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [StatisticsComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(StatisticsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/shared/statictics/statistics.service.spec.ts b/src/portal/src/app/shared/statictics/statistics.service.spec.ts new file mode 100644 index 000000000..f81773be9 --- /dev/null +++ b/src/portal/src/app/shared/statictics/statistics.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { StatisticsService } from './statistics.service'; + +xdescribe('StatisticsService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [StatisticsService] + }); + }); + + it('should be created', inject([StatisticsService], (service: StatisticsService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/shared/target-exists-directive.spec.ts b/src/portal/src/app/shared/target-exists-directive.spec.ts new file mode 100644 index 000000000..ffecc239f --- /dev/null +++ b/src/portal/src/app/shared/target-exists-directive.spec.ts @@ -0,0 +1,8 @@ +import { TargetExistsValidatorDirective } from './target-exists-directive'; + +describe('TargetExistsValidatorDirective', () => { + it('should create an instance', () => { + const directive = new TargetExistsValidatorDirective(null, null); + expect(directive).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/sign-in/sign-in.component.spec.ts b/src/portal/src/app/sign-in/sign-in.component.spec.ts new file mode 100644 index 000000000..e1ed68dd4 --- /dev/null +++ b/src/portal/src/app/sign-in/sign-in.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SignInComponent } from './sign-in.component'; + +xdescribe('SignInComponent', () => { + let component: SignInComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [SignInComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SignInComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/portal/src/app/sign-in/sign-in.service.spec.ts b/src/portal/src/app/sign-in/sign-in.service.spec.ts new file mode 100644 index 000000000..6c36d9316 --- /dev/null +++ b/src/portal/src/app/sign-in/sign-in.service.spec.ts @@ -0,0 +1,15 @@ +import { TestBed, inject } from '@angular/core/testing'; + +import { SignInService } from './sign-in.service'; + +xdescribe('SignInService', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [SignInService] + }); + }); + + it('should be created', inject([SignInService], (service: SignInService) => { + expect(service).toBeTruthy(); + })); +}); diff --git a/src/portal/src/app/skinable-config.service.spec.ts b/src/portal/src/app/skinable-config.service.spec.ts new file mode 100644 index 000000000..b6a898409 --- /dev/null +++ b/src/portal/src/app/skinable-config.service.spec.ts @@ -0,0 +1,18 @@ +import { TestBed, inject } from '@angular/core/testing'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { SkinableConfig } from './skinable-config.service'; + +describe('SkinableConfig', () => { + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + HttpClientTestingModule + ], + providers: [SkinableConfig] + }); + }); + + it('should be created', inject([SkinableConfig], (service: SkinableConfig) => { + expect(service).toBeTruthy(); + })); +});