diff --git a/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts index 07fd70e61e7f2b33bcc518f5c7a1eaebc1441fd4..614d521bc4230ad0b215f5c5e7a0d76a83fef1f6 100644 --- a/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/core/customer.service.spec.ts @@ -34,7 +34,7 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ -import { ENVIRONMENT, LoggerModule } from 'ui-frontend-common'; +import { AddressType, ENVIRONMENT, LoggerModule } from 'ui-frontend-common'; import { BASE_URL, Customer, Operators, OtpState, SearchQuery } from 'ui-frontend-common'; import { environment } from './../../environments/environment'; @@ -169,6 +169,7 @@ const expectedCustomer: Customer = { companyName: 'John Co.', passwordRevocationDelay: 3, otp: OtpState.OPTIONAL, + addressType: AddressType.POSTAL, address: { street: 'street', zipCode: '12345', @@ -185,6 +186,7 @@ const expectedCustomer: Customer = { code: '666666', name: 'Alice Vans', companyName: 'Vans', + addressType: AddressType.POSTAL, address: { street: 'street2', zipCode: '43121', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.component.spec.ts index 23fd0258b9c05ba38830bac60d77f4a50f9d806f..2811763eea3fff2a907b39fffe4f1d3ce31d257f 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.component.spec.ts @@ -45,7 +45,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Router } from '@angular/router'; import { of , Subject } from 'rxjs'; -import { Customer, OtpState, Owner, Tenant } from 'ui-frontend-common'; +import { AddressType, Customer, OtpState, Owner, Tenant } from 'ui-frontend-common'; import { InfiniteScrollStubDirective, VitamUICommonTestModule } from 'ui-frontend-common/testing'; import { CustomerService } from '../../core/customer.service'; import { CustomerDataService } from '../customer.data.service'; @@ -107,6 +107,7 @@ describe('CustomerListComponent', () => { 'kouygues.com', ], defaultEmailDomain: 'kouygues.com', + addressType: AddressType.POSTAL, address: { street: '13 rue faubourg', zipCode: '75009', @@ -133,6 +134,7 @@ describe('CustomerListComponent', () => { 'louygues.com', ], defaultEmailDomain: 'louygues.com', + addressType: AddressType.POSTAL, address: { street: '13 rue faubourg', zipCode: '75009', @@ -159,6 +161,7 @@ describe('CustomerListComponent', () => { 'mouygues.com', ], defaultEmailDomain: 'mouygues.com', + addressType: AddressType.POSTAL, address: { street: '13 rue faubourg', zipCode: '75009', @@ -185,6 +188,7 @@ describe('CustomerListComponent', () => { 'nrange.com', ], defaultEmailDomain: 'nrange.com', + addressType: AddressType.POSTAL, address: { street: '13 rue faubourg', zipCode: '75009', @@ -211,6 +215,7 @@ describe('CustomerListComponent', () => { 'bouygues.com', ], defaultEmailDomain: 'bouygues.com', + addressType: AddressType.POSTAL, address: { street: '13 rue faubourg', zipCode: '75009', @@ -362,6 +367,7 @@ describe('CustomerListComponent', () => { customerId: customers[0].id, name: 'Toto', companyName: 'Toto & Co', + addressType: AddressType.POSTAL, address: { street: null, zipCode: null, diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.service.spec.ts index 85cd24ded79411bc823a7c501a5f0b9a34e7cd9d..425dbd15612cee853005a38a43ce6d5bc7324921 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/customer-list.service.spec.ts @@ -38,7 +38,7 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { Type } from '@angular/core'; import { TestBed } from '@angular/core/testing'; -import { ENVIRONMENT } from 'ui-frontend-common'; +import { AddressType, ENVIRONMENT } from 'ui-frontend-common'; import { BASE_URL, Customer, Direction, LoggerModule, OtpState, PageRequest } from 'ui-frontend-common'; import { environment } from './../../../environments/environment'; import { CustomerListService } from './customer-list.service'; @@ -69,6 +69,7 @@ const expectedCustomersPage: { values: Customer[], pageNum: number, pageSize: nu name: 'Emmanuel Deviller', code: '002345', companyName: 'vitamui', + addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', @@ -84,6 +85,7 @@ const expectedCustomersPage: { values: Customer[], pageNum: number, pageSize: nu name: 'Julien Cornille', code: '002345', companyName: 'vitamui', + addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', @@ -93,6 +95,7 @@ const expectedCustomersPage: { values: Customer[], pageNum: number, pageSize: nu readonly: false }, ], + addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', @@ -125,6 +128,7 @@ const expectedCustomersPage: { values: Customer[], pageNum: number, pageSize: nu name: 'Mr Président', code: '022345', companyName: 'Electricité de france', + addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', @@ -140,6 +144,7 @@ const expectedCustomersPage: { values: Customer[], pageNum: number, pageSize: nu name: 'Jean Dupond', code: '025000', companyName: 'Electricité de france', + addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', @@ -149,6 +154,7 @@ const expectedCustomersPage: { values: Customer[], pageNum: number, pageSize: nu readonly: false }, ], + addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', @@ -189,6 +195,7 @@ const customersPage: { values: Customer[], pageNum: number, pageSize: number, ha name: 'Emmanuel Deviller', code: '002345', companyName: 'vitamui', + addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', @@ -204,6 +211,7 @@ const customersPage: { values: Customer[], pageNum: number, pageSize: number, ha name: 'Julien Cornille', code: '002345', companyName: 'vitamui', + addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', @@ -213,6 +221,7 @@ const customersPage: { values: Customer[], pageNum: number, pageSize: number, ha readonly: false }, ], + addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', @@ -245,6 +254,7 @@ const customersPage: { values: Customer[], pageNum: number, pageSize: number, ha name: 'Mr Président', code: '022345', companyName: 'Electricité de france', + addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', @@ -260,6 +270,7 @@ const customersPage: { values: Customer[], pageNum: number, pageSize: number, ha name: 'Jean Dupond', code: '025000', companyName: 'Electricité de france', + addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', @@ -269,6 +280,7 @@ const customersPage: { values: Customer[], pageNum: number, pageSize: number, ha readonly: false }, ], + addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/owner-list/owner-list.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/owner-list/owner-list.component.spec.ts index 3e455787ca0cb75f41e0df96bb43f7c95d44dbb8..e61c59a82aa3b171a7766c97e7ed7279bcb0ab21 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-list/owner-list/owner-list.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-list/owner-list/owner-list.component.spec.ts @@ -42,7 +42,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Router } from '@angular/router'; import { of , Subject } from 'rxjs'; -import { OtpState, Owner, Tenant } from 'ui-frontend-common'; +import { AddressType, OtpState, Owner, Tenant } from 'ui-frontend-common'; import { extend } from 'underscore'; import { CustomerDataService } from '../../customer.data.service'; import { OwnerCreateComponent } from '../../owner-create/owner-create.component'; @@ -265,6 +265,7 @@ describe('OwnerListComponent', () => { customerId: testhost.customer.id, name: 'Toto', companyName: 'Toto & Co', + addressType: AddressType.POSTAL, address: { street: null, zipCode: null, diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-tab.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-tab.component.spec.ts index c3c5eaa24f3ce4bffbd3ba676b5859474f61a833..d188fe12f681bd02c7e578ca3030b04472adf42a 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-tab.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/graphic-identity-tab/graphic-identity-tab.component.spec.ts @@ -39,7 +39,7 @@ import { Component } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog'; import { of } from 'rxjs'; -import { ENVIRONMENT } from 'ui-frontend-common'; +import { AddressType, ENVIRONMENT } from 'ui-frontend-common'; import { BASE_URL, Customer, LoggerModule, OtpState } from 'ui-frontend-common'; import { VitamUISnackBar } from '../../../shared/vitamui-snack-bar'; import { environment } from './../../../../environments/environment'; @@ -57,6 +57,7 @@ let expectedCustomer: Customer = { passwordRevocationDelay: 6, otp: OtpState.DEACTIVATED, idp: true, + addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013', @@ -74,6 +75,7 @@ let expectedCustomer: Customer = { code: '254791', name: 'owner name', companyName: 'company name', + addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013', @@ -118,6 +120,7 @@ describe('GraphicIdentityTabComponent', () => { passwordRevocationDelay: 6, otp: OtpState.DEACTIVATED, idp: true, + addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013', @@ -135,6 +138,7 @@ describe('GraphicIdentityTabComponent', () => { code: '254791', name: 'owner name', companyName: 'company name', + addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/information-tab/information-tab.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/information-tab/information-tab.component.spec.ts index 0ba39a06777d0a9ac232eb1aa42cdc3bf0175ca5..e1bc81c0b0276d938e26a7eae5c24ccb42f7c255 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/information-tab/information-tab.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/information-tab/information-tab.component.spec.ts @@ -41,7 +41,7 @@ import { AsyncValidator, ControlValueAccessor, NG_VALUE_ACCESSOR, ReactiveFormsM import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { of } from 'rxjs'; -import { Customer, OtpState } from 'ui-frontend-common'; +import { AddressType, Customer, OtpState } from 'ui-frontend-common'; import { VitamUICommonTestModule } from 'ui-frontend-common/testing'; import { CustomerService } from '../../../core/customer.service'; import { CustomerCreateValidators } from '../../customer-create/customer-create.validators'; @@ -64,6 +64,7 @@ let expectedCustomer: Customer = { 'kouygues.com', ], defaultEmailDomain: 'kouygues.com', + addressType: AddressType.POSTAL, address: { street: '13 rue faubourg', zipCode: '75009', @@ -141,6 +142,7 @@ describe('Customer InformationTabComponent', () => { 'kouygues.com', ], defaultEmailDomain: 'kouygues.com', + addressType: AddressType.POSTAL, address: { street: '13 rue faubourg', zipCode: '75009', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/sso-tab.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/sso-tab.component.spec.ts index 82d424d9d1beb1332220fabf116cb831d8627160..7414439be298d558f4a2255af04478691e1f0776 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/sso-tab.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/customer-preview/sso-tab/sso-tab.component.spec.ts @@ -40,7 +40,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { MatDialog } from '@angular/material/dialog'; import { of , Subject } from 'rxjs'; -import { Customer, IdentityProvider, OtpState } from 'ui-frontend-common'; +import { AddressType, Customer, IdentityProvider, OtpState } from 'ui-frontend-common'; import { IdentityProviderService } from './identity-provider.service'; import { SsoTabComponent } from './sso-tab.component'; @@ -85,6 +85,7 @@ class TestHostComponent { 'test6.com', ], defaultEmailDomain : '1test.com', + addressType: AddressType.POSTAL, address : { street : '73 rue du Faubourg Poissonnière ', zipCode : '75009', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts index 369bf8caee1431af48989687017acd3f5a5a0365..126f037bab67f1edd3009c9a455ee098aba70a92 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner-create/owner-create.component.spec.ts @@ -35,7 +35,7 @@ * knowledge of the CeCILL-C license and that you accept its terms. */ import { EMPTY, of } from 'rxjs'; -import { ConfirmDialogService, Owner } from 'ui-frontend-common'; +import { AddressType, ConfirmDialogService, Owner } from 'ui-frontend-common'; import { VitamUICommonTestModule } from 'ui-frontend-common/testing'; /* tslint:disable:max-classes-per-file directive-selector */ @@ -82,6 +82,7 @@ describe('OwnerCreateComponent', () => { name: 'Mr Président', code: '02234512', companyName: 'Electricité de france', + addressType: AddressType.POSTAL, address: { street: '22-30 Avenue de WAGRAM', zipCode: '75008', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.spec.ts index d8bf477c83e43338011a1199520a9a044baec1f6..6c7dd2d9f72e7128d31b67fbfe76624785678aa4 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner-form/owner-form.component.spec.ts @@ -44,7 +44,7 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { of , timer } from 'rxjs'; import { map } from 'rxjs/operators'; -import { Owner } from 'ui-frontend-common'; +import { AddressType, Owner } from 'ui-frontend-common'; import { VitamUICommonTestModule } from 'ui-frontend-common/testing'; import { OwnerService } from '../owner.service'; import { OwnerFormComponent } from './owner-form.component'; @@ -106,6 +106,7 @@ describe('OwnerFormComponent', () => { code: '43214345345', name: 'Toto', companyName: 'Toto & Co.', + addressType: AddressType.POSTAL, address: { street: 'Street name', zipCode: '2134', @@ -134,6 +135,7 @@ describe('OwnerFormComponent', () => { code: 'invalid-code', name: 'Toto', companyName: 'Toto & Co.', + addressType: AddressType.POSTAL, address: { street: 'Street name', zipCode: '2134', @@ -167,6 +169,7 @@ describe('OwnerFormComponent', () => { code: '43214345345', name: 'Toto', companyName: 'Toto & Co.', + addressType: AddressType.POSTAL, address: { street: 'Street name', zipCode: '2134', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts index a960aec16687f5981dcdbc875f9603fdb76d5f5e..9036dafb68822ddc8315a70ae7f7dfe266a28b2b 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner-resolver.service.spec.ts @@ -39,7 +39,7 @@ import { inject, TestBed } from '@angular/core/testing'; import { ActivatedRouteSnapshot, Router } from '@angular/router'; import { of } from 'rxjs'; -import { Owner } from 'ui-frontend-common'; +import { AddressType, Owner } from 'ui-frontend-common'; import { OwnerResolver } from './owner-resolver.service'; import { OwnerService } from './owner.service'; @@ -50,6 +50,7 @@ const expectedOwner: Owner = { name: 'Julien Cornille', code: '10234665', companyName: 'vitamui', + addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts index 0d2a3407a547fd75280763ad6412f47d63ed0c30..edde01f4799b3bd3215d00c4bd5b0a38f346dcd6 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/owner.service.spec.ts @@ -39,7 +39,7 @@ import { inject, TestBed } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { Type } from '@angular/core'; -import { BASE_URL, Owner } from 'ui-frontend-common'; +import { AddressType, BASE_URL, Owner } from 'ui-frontend-common'; import { VitamUISnackBar, VitamUISnackBarComponent } from '../shared/vitamui-snack-bar'; import { OwnerService } from './owner.service'; @@ -50,6 +50,7 @@ const expectedOwner: Owner = { name: 'Julien Cornille', code: '10234665', companyName: 'vitamui', + addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', diff --git a/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts b/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts index ce10ba657f13b1f4ba9c879052ebcad416754b44..84f03c1a52398ac3d73155a5eaaa958e83840d6e 100644 --- a/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/customer/tenant.service.spec.ts @@ -34,7 +34,7 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ -import { BASE_URL, Operators, Owner, SearchQuery, Tenant } from 'ui-frontend-common'; +import { AddressType, BASE_URL, Operators, Owner, SearchQuery, Tenant } from 'ui-frontend-common'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { inject, TestBed } from '@angular/core/testing'; @@ -66,6 +66,7 @@ const expectedOwner: Owner = { code: '10234501', companyName: 'vitamui', readonly: false, + addressType: AddressType.POSTAL, address: { street: '73 rue du Faubourg Poissonnière ', zipCode: '75009', diff --git a/ui/ui-frontend/projects/identity/src/app/user/user-preview/user-information-tab/user-information-tab.component.spec.ts b/ui/ui-frontend/projects/identity/src/app/user/user-preview/user-information-tab/user-information-tab.component.spec.ts index a6b7bd3d3ba1dde154b8f3cf266ac8f2c83e278e..27ff5195be224d35b896f760b274e521f848e3aa 100644 --- a/ui/ui-frontend/projects/identity/src/app/user/user-preview/user-information-tab/user-information-tab.component.spec.ts +++ b/ui/ui-frontend/projects/identity/src/app/user/user-preview/user-information-tab/user-information-tab.component.spec.ts @@ -37,7 +37,7 @@ /* tslint:disable: max-file-line-count max-classes-per-file */ import { of } from 'rxjs'; -import { AdminUserProfile, AuthService, Customer, OtpState, User } from 'ui-frontend-common'; +import { AddressType, AdminUserProfile, AuthService, Customer, OtpState, User } from 'ui-frontend-common'; import { VitamUICommonTestModule } from 'ui-frontend-common/testing'; import { Component, Directive, Input, ViewChild } from '@angular/core'; @@ -90,6 +90,7 @@ let expectedCustomer: Customer = { passwordRevocationDelay: 6, otp: OtpState.DEACTIVATED, idp: true, + addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013', @@ -107,6 +108,7 @@ let expectedCustomer: Customer = { code: '254791', name: 'owner name', companyName: 'company name', + addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013', @@ -198,6 +200,7 @@ describe('UserInfoTabComponent', () => { passwordRevocationDelay: 6, otp: OtpState.DEACTIVATED, idp: true, + addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013', @@ -215,6 +218,7 @@ describe('UserInfoTabComponent', () => { code: '254791', name: 'owner name', companyName: 'company name', + addressType: AddressType.POSTAL, address: { street: '85 rue des bois', zipCode: '75013',