forked from MapComplete/MapComplete
Fix tests
This commit is contained in:
parent
0e760b908c
commit
16816a916c
28 changed files with 124 additions and 117 deletions
|
@ -1,11 +1,11 @@
|
|||
import { Utils } from "../../../Utils"
|
||||
import LayoutConfig from "../../../Models/ThemeConfig/LayoutConfig"
|
||||
import { Utils } from "../../../src/Utils"
|
||||
import LayoutConfig from "../../../src/Models/ThemeConfig/LayoutConfig"
|
||||
|
||||
import * as bookcaseJson from "../../../assets/generated/themes/bookcases.json"
|
||||
import { OsmTags } from "../../../Models/OsmFeature"
|
||||
import * as bookcaseJson from "../../../src/assets/generated/themes/bookcases.json"
|
||||
import { OsmTags } from "../../../src/Models/OsmFeature"
|
||||
import { Feature, Geometry } from "geojson"
|
||||
import { expect, it } from "vitest"
|
||||
import ThemeViewState from "../../../Models/ThemeViewState"
|
||||
import ThemeViewState from "../../../src/Models/ThemeViewState"
|
||||
import ScriptUtils from "../../../scripts/ScriptUtils"
|
||||
|
||||
const latestTags = {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import CreateMultiPolygonWithPointReuseAction from "../../../Logic/Osm/Actions/CreateMultiPolygonWithPointReuseAction"
|
||||
import { Tag } from "../../../Logic/Tags/Tag"
|
||||
import { Changes } from "../../../Logic/Osm/Changes"
|
||||
import CreateMultiPolygonWithPointReuseAction from "../../../src/Logic/Osm/Actions/CreateMultiPolygonWithPointReuseAction"
|
||||
import { Tag } from "../../../src/Logic/Tags/Tag"
|
||||
import { Changes } from "../../../src/Logic/Osm/Changes"
|
||||
import { describe, expect, it } from "vitest"
|
||||
import { OsmConnection } from "../../../src/Logic/Osm/OsmConnection"
|
||||
import { ImmutableStore } from "../../../src/Logic/UIEventSource"
|
||||
|
||||
describe("CreateMultiPolygonWithPointReuseAction", () => {
|
||||
it("should produce a correct changeset", () => {
|
||||
|
@ -102,7 +104,12 @@ describe("CreateMultiPolygonWithPointReuseAction", () => {
|
|||
[],
|
||||
"import"
|
||||
)
|
||||
const descriptions = await action.Perform(new Changes())
|
||||
const descriptions = await action.Perform(
|
||||
new Changes({
|
||||
dryRun: new ImmutableStore(true),
|
||||
osmConnection: new OsmConnection(),
|
||||
})
|
||||
)
|
||||
|
||||
const ways = descriptions.filter((d) => d.type === "way")
|
||||
// "unexpected id"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue