From 17ee5176022e7341a0b06ca1e2fbff65c1bcf61c Mon Sep 17 00:00:00 2001 From: grom Date: Wed, 28 Oct 2026 22:57:42 -0600 Subject: [PATCH] An unpainted loot-roll name is the reference's own placeholder, not nothing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `nothing_repaints_a_frame_that_opened_before_its_snapshot` asserted that a frame which never painted has no name text. It has one: `LootFrame.xml` authors `text="Item Name"` on `$parentName` as a design-time placeholder, and every copy of that file carries it — the realm's `patch-4`, `patch.MPQ` and stock `interface.MPQ` alike. So "stays blank" means **unchanged**, which is what the test is actually about, and it now reads the untouched label once and compares against that rather than against nil. The realm owns its own placeholder. Leaves the five other `group_loot_tests` failures, and they are a different thing worth stating: the realm has **rewritten `GroupLootFrame_OnShow`**. It now opens with local texture, name, ... = GetLootRollItemInfo(this.rollID) if ( not name ) then this:Hide() return end where the stock body had no such guard and called `SetText(name)` with a nil. So on this realm an in-flight roll does not open at all until its name is known, and `in_flight_roll_opens_without_a_name_or_icon` encodes the older behaviour in its name as well as its assertions. That one needs a probe of what `GetLootRollItemInfo` answers in that state before anything is rewritten — the visibility assertion above it passes, which does not fit either reading yet. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn --- .../src/ui_script/group_loot_tests.rs | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/crates/benilla-app/src/ui_script/group_loot_tests.rs b/crates/benilla-app/src/ui_script/group_loot_tests.rs index 5339a002..62c75032 100644 --- a/crates/benilla-app/src/ui_script/group_loot_tests.rs +++ b/crates/benilla-app/src/ui_script/group_loot_tests.rs @@ -385,6 +385,20 @@ fn nothing_repaints_a_frame_that_opened_before_its_snapshot() { let mut s = setup(); load_group_loot(&s); + // What the label reads **untouched**, which is not nothing: `LootFrame.xml` authors + // `text="Item Name"` on `$parentName` as a design-time placeholder, and every copy of that + // file has it — the realm's `patch-4`, `patch.MPQ` and stock `interface.MPQ` alike. So an + // unpainted name is the placeholder, and "stays blank" means **unchanged**, not nil. Read + // rather than written here, so the realm owns its own placeholder. + let unpainted = s + .eval::>("return GroupLootFrame1Name:GetText()") + .unwrap(); + assert!( + unpainted.is_some(), + "the reference authors a placeholder on this label; if that ever stops being true this \ + test's premise is what changed" + ); + // The order the app must never produce: the event first, against a model with no such roll. s.fire_event( "START_LOOT_ROLL", @@ -397,7 +411,7 @@ fn nothing_repaints_a_frame_that_opened_before_its_snapshot() { assert_eq!( s.eval::>("return GroupLootFrame1Name:GetText()") .unwrap(), - None, + unpainted, "nothing to paint yet — this is the reported state" ); @@ -408,8 +422,8 @@ fn nothing_repaints_a_frame_that_opened_before_its_snapshot() { assert_eq!( s.eval::>("return GroupLootFrame1Name:GetText()") .unwrap(), - None, - "the name stays blank: the reference has no repaint path" + unpainted, + "the name is unchanged: the reference has no repaint path" ); assert!( !s.eval::("return GroupLootFrame1Decoration:IsShown()") @@ -429,7 +443,7 @@ fn nothing_repaints_a_frame_that_opened_before_its_snapshot() { assert_eq!( s.eval::>("return GroupLootFrame1Name:GetText()") .unwrap(), - None + unpainted ); }