Editing User:LVL/SandboxGive feedback
Jump to navigation
Jump to search
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 1: | Line 1: | ||
== ItemData Module Tests (Pre-Deployment Check) == | |||
=== get_cost === | |||
* **Valid item:** {{#invoke:ItemData|get_cost|Berserker}} | |||
* (Expected: "3,200") | |||
* **Valid item with weird casing:** {{#invoke:ItemData|get_cost|bErSeRkEr}} | |||
* (Expected: "3,200") | |||
* **Valid item with whitespace:** {{#invoke:ItemData|get_cost| Berserker }} | |||
* (Expected: "3,200") | |||
* **Invalid item:** {{#invoke:ItemData|get_cost|This Item Does Not Exist}} | |||
* (Expected: A red "Item Not Found" error) | |||
* **No item:** {{#invoke:ItemData|get_cost|}} | |||
* (Expected: A red "Item Not Found" error) | |||
=== get_type === | |||
* **Weapon:** {{#invoke:ItemData|get_type|Active Reload}} | |||
* (Expected: "Weapon" or its localized equivalent) | |||
* **Armor:** {{#invoke:ItemData|get_type|Witchmail}} | |||
* (Expected: "Armor" or its localized equivalent) | |||
* **Tech:** {{#invoke:ItemData|get_type|Spirit Strike}} | |||
* (Expected: "Tech" or its localized equivalent) | |||
=== is_active === | |||
* **Passive item:** {{#invoke:ItemData|is_active|Berserker}} | |||
* (Expected: "false") | |||
* **Active item (Toggle):** {{#invoke:ItemData|is_active|Blood Tribute}} | |||
* (Expected: "true") | |||
* **Active item (InstantCast):** {{#invoke:ItemData|is_active|Refresher}} | |||
* (Expected: "true") | |||
{{#invoke: | === get_prop === | ||
* **Simple property:** {{#invoke:ItemData|get_prop|Berserker|Tier}} | |||
* (Expected: "3") | |||
* **Table property (ShopFilters):** {{#invoke:ItemData|get_prop|Armor Piercing Rounds|ShopFilters}} | |||
* (Expected: "ClipSize, WeaponDamage") | |||
* **Property of a disabled item:** {{#invoke:ItemData|get_prop|Ablative Coat|MaxBulletResist}} | |||
* (Expected: "30") | |||
=== get_codename === | |||
* | * **Get codename for "Refresher":** {{#invoke:ItemData|get_codename|Refresher}} | ||
* | * (Expected: "upgrade_refresher") | ||
* | * **Get codename for "Witchmail":** {{#invoke:ItemData|get_codename|Witchmail}} | ||
* {{ | * (Expected: "upgrade_absorbing_armor") | ||
* | |||
== | === get_component_name === | ||
{{ | * **Item with components:** {{#invoke:ItemData|get_component_name|Vortex Web}} | ||
{{ | * (Expected: The name of the item with codename "upgrade_containment". This will be blank if that item has no name.) | ||
* **Item without components:** {{#invoke:ItemData|get_component_name|Berserker}} | |||
* (Expected: Blank) | |||
=== get_scalar (Testing Current Data) === | |||
'''Note:''' This confirms the module correctly handles missing `SpiritScaling` data in the current JSON. | |||
* **Call for "Torment Pulse":** {{#invoke:ItemData|get_scalar|Torment Pulse|DamagePulseAmount}} | |||
* (Expected: A red error message like "SpiritScaling data not found for "Torment Pulse"") | |||
=== get_headcount === | |||
* **Total enabled items:** {{#invoke:ItemData|get_headcount}} | |||
* (Expected: A number representing the total count of enabled items with names in your full JSON.) | |||
=== Integration Test (Using a common template) === | |||
* **Transcluding a key template with a real, enabled item:** | |||
{{Infobox item|name=Witchmail}} | |||
* (The entire infobox should render correctly.) | |||
* **Transcluding with a disabled item:** | |||
{{Infobox item|name=Ablative Coat}} | |||
* (The infobox should still render, showing how the template handles disabled items.) | |||
=== DEBUGGING Ablative Coat === | |||
{{#invoke:ItemData|debug_lookup|Ablative Coat}} | |||