| 
									
										
										
										
											2021-04-22 03:30:46 +02:00
										 |  |  | import T from "./TestHelper"; | 
					
						
							|  |  |  | import {Utils} from "../Utils"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Utils.runningFromConsole = true; | 
					
						
							|  |  |  | import TagRenderingQuestion from "../UI/Popup/TagRenderingQuestion"; | 
					
						
							|  |  |  | import {UIEventSource} from "../Logic/UIEventSource"; | 
					
						
							|  |  |  | import TagRenderingConfig from "../Customizations/JSON/TagRenderingConfig"; | 
					
						
							|  |  |  | import LayoutConfig from "../Customizations/JSON/LayoutConfig"; | 
					
						
							|  |  |  | import {LayoutConfigJson} from "../Customizations/JSON/LayoutConfigJson"; | 
					
						
							|  |  |  | import * as assert from "assert"; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  | export default class ThemeSpec extends T{ | 
					
						
							|  |  |  |     constructor() { | 
					
						
							|  |  |  |         super("Theme tests", | 
					
						
							|  |  |  |             [ | 
					
						
							|  |  |  |                 ["Nested overrides work", () => { | 
					
						
							| 
									
										
										
										
											2021-04-22 03:30:46 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  |                     const themeConfigJson : LayoutConfigJson = { | 
					
						
							|  |  |  |                         description: "Descr", | 
					
						
							|  |  |  |                         icon: "", | 
					
						
							|  |  |  |                         language: ["en"], | 
					
						
							|  |  |  |                         layers: [ | 
					
						
							|  |  |  |                             { | 
					
						
							|  |  |  |                                 builtin: "public_bookcase", | 
					
						
							|  |  |  |                                 override: { | 
					
						
							|  |  |  |                                     source:{ | 
					
						
							|  |  |  |                                         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) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 }] | 
					
						
							|  |  |  |             ]); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |