2021-04-09 02:56:48 +02:00
|
|
|
import {Utils} from "../Utils";
|
|
|
|
|
|
|
|
Utils.runningFromConsole = true;
|
|
|
|
import {equal} from "assert";
|
|
|
|
import T from "./TestHelper";
|
|
|
|
import {FromJSON} from "../Customizations/JSON/FromJSON";
|
|
|
|
import Locale from "../UI/i18n/Locale";
|
|
|
|
import Translations from "../UI/i18n/Translations";
|
|
|
|
import {UIEventSource} from "../Logic/UIEventSource";
|
|
|
|
import TagRenderingConfig from "../Customizations/JSON/TagRenderingConfig";
|
|
|
|
import EditableTagRendering from "../UI/Popup/EditableTagRendering";
|
|
|
|
import {Translation} from "../UI/i18n/Translation";
|
|
|
|
import {OH, OpeningHour} from "../UI/OpeningHours/OpeningHours";
|
|
|
|
import PublicHolidayInput from "../UI/OpeningHours/PublicHolidayInput";
|
|
|
|
import {SubstitutedTranslation} from "../UI/SubstitutedTranslation";
|
|
|
|
import {Tag} from "../Logic/Tags/Tag";
|
|
|
|
import {And} from "../Logic/Tags/And";
|
|
|
|
import {ImageSearcher} from "../Logic/Actors/ImageSearcher";
|
2021-04-09 02:57:06 +02:00
|
|
|
import {AllKnownLayouts} from "../Customizations/AllKnownLayouts";
|
|
|
|
import AllKnownLayers from "../Customizations/AllKnownLayers";
|
2021-04-09 02:56:48 +02:00
|
|
|
|
|
|
|
|
2021-04-09 02:57:06 +02:00
|
|
|
new T("ImageAttribution Tests", [
|
2021-04-09 02:56:48 +02:00
|
|
|
[
|
2021-04-09 02:57:06 +02:00
|
|
|
"Should find all the images",
|
2021-04-09 02:56:48 +02:00
|
|
|
() => {
|
2021-04-09 02:57:06 +02:00
|
|
|
const pumps = AllKnownLayers.sharedLayers["bike_repair_station"]
|
|
|
|
const expected = "./assets/layers/bike_repair_station/pump_example_manual.jpg"
|
|
|
|
const images = pumps.ExtractImages();
|
|
|
|
|
|
|
|
equal(images.length, 5, "The pump example was not found")
|
2021-04-09 02:56:48 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
])
|