| 
									
										
										
										
											2021-04-06 16:12:44 +02:00
										 |  |  | import {Utils} from "../Utils"; | 
					
						
							|  |  |  | import {equal} from "assert"; | 
					
						
							|  |  |  | import T from "./TestHelper"; | 
					
						
							|  |  |  | import {UIEventSource} from "../Logic/UIEventSource"; | 
					
						
							|  |  |  | import {ImageSearcher} from "../Logic/Actors/ImageSearcher"; | 
					
						
							| 
									
										
										
										
											2021-08-07 23:11:34 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | Utils.runningFromConsole = true; | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  | export default class ImageSearcherSpec extends T { | 
					
						
							| 
									
										
										
										
											2021-04-06 16:12:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  |     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"); | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2021-09-15 01:33:52 +02:00
										 |  |  |             ], | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  |         ]); | 
					
						
							| 
									
										
										
										
											2021-09-09 00:05:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2021-04-06 16:12:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-14 02:25:30 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | } |