Fix issue #65: Item selecting icon
All checks were successful
Test / test (push) Successful in 2s
Build and Deploy Nuxt / build (push) Successful in 1m7s

This commit is contained in:
Gitea OpenCode Agent
2026-10-15 16:01:36 +00:00
committed by Aran Roig
parent 0caacf434f
commit dd4c9535d3
20 changed files with 823 additions and 60 deletions

View File

@@ -78,9 +78,10 @@ test("the item window shows the info and offers both icon sources", () => {
for (const key of ["form.name", "form.category", "form.rarity", "form.weight", "form.properties", "form.description"]) {
assert.ok(itemWindowSource.includes(key), `expected the window to render ${key}`);
}
assert.doesNotMatch(itemWindowSource, /quantity/, "the item window must not list the quantity");
// 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 \}\)/);