Skip to content

Commit f5dd48a

Browse files
committed
Add tests for importing passive trees and fix control issues
1 parent 72a198e commit f5dd48a

4 files changed

Lines changed: 5588 additions & 29 deletions

File tree

spec/System/TestImportReimport_spec.lua

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
describe("TestImportReimport", function()
2-
local dkjson = require "dkjson"
32
local DEFAULT_CHARACTER_LEVEL = 12
43
local DEFAULT_ITEM_LEVEL = 10
54
local TEST_IMPORT_ITEM_ID = "test-import-item-1"
@@ -57,11 +56,9 @@ describe("TestImportReimport", function()
5756
end
5857

5958
local function reimportSocketedItemsWithOptions(itemTypeLine, inventoryId, socketedItems, clearItems)
60-
build.importTab.controls.charImportItemsClearSkills.state = true
61-
build.importTab.controls.charImportItemsClearItems.state = clearItems
6259
build.importTab:ImportItemsAndSkills(buildImportPayload({
6360
makeImportItem(itemTypeLine, inventoryId, socketedItems),
64-
}))
61+
}), clearItems, true, true)
6562
runCallback("OnFrame")
6663
end
6764

@@ -112,15 +109,13 @@ Added Fire Damage 1/0 DISABLED 1
112109
socketGroup.mainActiveSkill = 2
113110
runCallback("OnFrame")
114111

115-
build.importTab.controls.charImportItemsClearSkills.state = true
116-
build.importTab.controls.charImportItemsClearItems.state = false
117112
build.importTab:ImportItemsAndSkills(buildImportPayload({
118113
makeImportItem("Iron Hat", "Helm", {
119114
makeSocketedGemEntry(0, false, "Cleave", 1),
120115
makeSocketedGemEntry(1, false, "Heavy Strike", 1),
121116
makeSocketedGemEntry(2, true, "Added Fire Damage Support", 2),
122117
}),
123-
}))
118+
}), false, true, true)
124119
runCallback("OnFrame")
125120

126121
socketGroup = build.skillsTab.socketGroupList[1]
@@ -208,8 +203,6 @@ Blight 20/0 1
208203
glovesGroup.enabled = false
209204
runCallback("OnFrame")
210205

211-
build.importTab.controls.charImportItemsClearSkills.state = true
212-
build.importTab.controls.charImportItemsClearItems.state = false
213206
build.importTab:ImportItemsAndSkills(buildImportPayload({
214207
makeImportItem("Iron Hat", "Helm", {
215208
makeSocketedGemEntry(0, false, "Cleave", 1),
@@ -219,7 +212,7 @@ Blight 20/0 1
219212
makeImportItem("Rawhide Gloves", "Gloves", {
220213
makeSocketedGemEntry(0, false, "Blight", 20),
221214
}, "test-import-item-gloves"),
222-
}))
215+
}), false, true, true)
223216
runCallback("OnFrame")
224217

225218
local groupsBySlot = {}

0 commit comments

Comments
 (0)