forked from MapComplete/MapComplete
		
	Refactoring of image detection, fix loading wikimedia images
This commit is contained in:
		
							parent
							
								
									4da6070b28
								
							
						
					
					
						commit
						a6e8714ae0
					
				
					 21 changed files with 468 additions and 528 deletions
				
			
		|  | @ -1,28 +0,0 @@ | |||
| import {Utils} from "../Utils"; | ||||
| import {equal} from "assert"; | ||||
| import T from "./TestHelper"; | ||||
| import {UIEventSource} from "../Logic/UIEventSource"; | ||||
| import {ImageSearcher} from "../Logic/Actors/ImageSearcher"; | ||||
| 
 | ||||
| Utils.runningFromConsole = true; | ||||
| export default class ImageSearcherSpec extends T { | ||||
| 
 | ||||
|     constructor() { | ||||
|         super("imagesearcher", [ | ||||
|             [ | ||||
|                 "Should find images", | ||||
|                 () => { | ||||
|                     const tags = new UIEventSource({ | ||||
|                         "mapillary": "https://www.mapillary.com/app/?pKey=bYH6FFl8LXAPapz4PNSh3Q" | ||||
|                     }); | ||||
|                     const searcher = ImageSearcher.construct(tags) | ||||
|                     const result = searcher.data[0]; | ||||
|                     equal(result.url, "https://www.mapillary.com/map/im/bYH6FFl8LXAPapz4PNSh3Q"); | ||||
|                 } | ||||
|             ], | ||||
|         ]); | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  | @ -1,7 +1,6 @@ | |||
| import TagSpec from "./Tag.spec"; | ||||
| import ImageAttributionSpec from "./ImageAttribution.spec"; | ||||
| import GeoOperationsSpec from "./GeoOperations.spec"; | ||||
| import ImageSearcherSpec from "./ImageSearcher.spec"; | ||||
| import ThemeSpec from "./Theme.spec"; | ||||
| import UtilsSpec from "./Utils.spec"; | ||||
| import OsmObjectSpec from "./OsmObject.spec"; | ||||
|  | @ -18,7 +17,6 @@ const allTests = [ | |||
|     new TagSpec(), | ||||
|     new ImageAttributionSpec(), | ||||
|     new GeoOperationsSpec(), | ||||
|     new ImageSearcherSpec(), | ||||
|     new ThemeSpec(), | ||||
|     new UtilsSpec(), | ||||
|     new UnitsSpec(), | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue