-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create source parameter to coordinateurs http (#308)
* feat: create source parameter to coordinateurs http * fix: replace production url * fix: url coordinateurs test by default
- Loading branch information
Showing
7 changed files
with
51 additions
and
6 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
src/features/coordinateurs/data/configuration/data.configuration.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type DataCoordinateursConfiguration = { | ||
conseillers: string; | ||
coordinateurs: string; | ||
}; | ||
|
||
export const DATA_COORDINATEURS_CONFIGURATION: DataCoordinateursConfiguration = { | ||
conseillers: 'https://cdn.jsdelivr.net/npm/@gouvfr-anct/cartographie-nationale@5.10.1/assets/data/conseillers.json', | ||
coordinateurs: 'https://cdn.jsdelivr.net/npm/@gouvfr-anct/cartographie-nationale@5.10.1/assets/data/coordinateurs.json' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './data.configuration'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './http'; | ||
export * from './configuration'; |
27 changes: 27 additions & 0 deletions
27
...rdinateurs/layouts/coordinateurs-web-component/coordinateurs-web-component.layout.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
import { CoordinateursWebComponentLayout } from './coordinateurs-web-component.layout'; | ||
|
||
describe('CoordinateursWebComponentLayout', (): void => { | ||
beforeEach(async (): Promise<void> => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [CoordinateursWebComponentLayout], | ||
imports: [RouterTestingModule], | ||
providers: [ | ||
{ | ||
useValue: new Map() | ||
} | ||
] | ||
}) | ||
.compileComponents() | ||
.catch((): void => { | ||
throw new Error('CoordinateursWebComponentLayout'); | ||
}); | ||
}); | ||
|
||
it('should create the component', (): void => { | ||
const fixture: ComponentFixture<CoordinateursWebComponentLayout> = TestBed.createComponent(CoordinateursWebComponentLayout); | ||
const coordinateursWebComponentLayout: CoordinateursWebComponentLayout = fixture.componentInstance; | ||
expect(coordinateursWebComponentLayout).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters