Fix issue #65: Item selecting icon
Some checks failed
Test / test (push) Failing after 2s

This commit is contained in:
Gitea OpenCode Agent
2026-10-15 16:01:36 +00:00
parent cdafd1f53a
commit b47bbb4cab
20 changed files with 823 additions and 59 deletions

View File

@@ -77,8 +77,10 @@ test("the item window shows the info and offers both icon sources", () => {
for (const key of ["form.name", "form.category", "form.rarity", "form.quantity", "form.weight", "form.properties", "form.description"]) {
assert.ok(itemWindowSource.includes(key), `expected the window to render ${key}`);
}
// own icon: upload through the item route like the character sheet does its photo
assert.match(itemWindowSource, /\/item\/upload-image\?item=/);
// own icon: #65 moved picking one into a window of its own, which uploads through
// the item route (see tests/foundry-icon-picker.test.js); the sheet opens it and
// follows whatever the choice leaves behind.
assert.match(itemWindowSource, /CreateChildWindow\(id, ['"]item_icon_source['"]/);
// Foundry icon: switch the item image back to the one the world sent
assert.match(itemWindowSource, /form\.value\.foundryImage/);
assert.match(itemWindowSource, /updateItem\(\{ image: form\.value\.foundryImage \}\)/);