| 
									
										
										
										
											2021-04-22 03:30:46 +02:00
										 |  |  | import T from "./TestHelper"; | 
					
						
							|  |  |  | import {Utils} from "../Utils"; | 
					
						
							|  |  |  | import * as assert from "assert"; | 
					
						
							| 
									
										
										
										
											2021-08-07 23:11:34 +02:00
										 |  |  | import {LayoutConfigJson} from "../Models/ThemeConfig/Json/LayoutConfigJson"; | 
					
						
							|  |  |  | import LayoutConfig from "../Models/ThemeConfig/LayoutConfig"; | 
					
						
							| 
									
										
										
										
											2021-04-22 03:30:46 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-09 00:05:51 +02:00
										 |  |  | Utils.runningFromConsole = true; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default class ThemeSpec extends T { | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  |     constructor() { | 
					
						
							| 
									
										
										
										
											2021-09-22 05:02:09 +02:00
										 |  |  |         super("theme", | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  |             [ | 
					
						
							|  |  |  |                 ["Nested overrides work", () => { | 
					
						
							| 
									
										
										
										
											2021-04-22 03:30:46 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-09 00:05:51 +02:00
										 |  |  |                     const themeConfigJson: LayoutConfigJson = { | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  |                         description: "Descr", | 
					
						
							|  |  |  |                         icon: "", | 
					
						
							|  |  |  |                         language: ["en"], | 
					
						
							|  |  |  |                         layers: [ | 
					
						
							|  |  |  |                             { | 
					
						
							|  |  |  |                                 builtin: "public_bookcase", | 
					
						
							|  |  |  |                                 override: { | 
					
						
							| 
									
										
										
										
											2021-09-09 00:05:51 +02:00
										 |  |  |                                     source: { | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  |                                         geoJson: "xyz" | 
					
						
							|  |  |  |                                     } | 
					
						
							|  |  |  |                                 } | 
					
						
							| 
									
										
										
										
											2021-04-22 03:30:46 +02:00
										 |  |  |                             } | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  |                         ], | 
					
						
							|  |  |  |                         maintainer: "", | 
					
						
							|  |  |  |                         startLat: 0, | 
					
						
							|  |  |  |                         startLon: 0, | 
					
						
							|  |  |  |                         startZoom: 0, | 
					
						
							|  |  |  |                         title: { | 
					
						
							|  |  |  |                             en: "Title" | 
					
						
							|  |  |  |                         }, | 
					
						
							|  |  |  |                         version: "", | 
					
						
							|  |  |  |                         id: "test" | 
					
						
							| 
									
										
										
										
											2021-04-22 03:30:46 +02:00
										 |  |  |                     } | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |                     const themeConfig = new LayoutConfig(themeConfigJson); | 
					
						
							|  |  |  |                     assert.equal("xyz", themeConfig.layers[0].source.geojsonSource) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 }] | 
					
						
							|  |  |  |             ]); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |