Fix: fix tests with some refactoring

This commit is contained in:
Pieter Vander Vennet 2024-09-27 03:04:05 +02:00
parent f132963485
commit 0b992e75a4
7 changed files with 64 additions and 401 deletions

View file

@ -1,18 +1,11 @@
import { ExtraFuncParams, ExtraFunctions } from "../../src/Logic/ExtraFunctions"
import { OsmFeature } from "../../src/Models/OsmFeature"
import { describe, expect, it } from "vitest"
import { Feature } from "geojson"
import { OsmConnection } from "../../src/Logic/Osm/OsmConnection"
import { ImmutableStore, UIEventSource } from "../../src/Logic/UIEventSource"
import { UIEventSource } from "../../src/Logic/UIEventSource"
import { Changes } from "../../src/Logic/Osm/Changes"
import LinkImageAction from "../../src/Logic/Osm/Actions/LinkImageAction"
import FeaturePropertiesStore from "../../src/Logic/FeatureSource/Actors/FeaturePropertiesStore"
describe("Changes", () => {
it("should correctly apply the image tag if an image gets linked in between", async () => {
const dryRun = new ImmutableStore(true)
const osmConnection = new OsmConnection({ dryRun })
const changes = new Changes({ osmConnection, dryRun })
const changes = Changes.createTestObject()
const id = "node/42"
const tags = new UIEventSource({ id, amenity: "shop" })
const addImage = new LinkImageAction(