An unpainted loot-roll name is the reference's own placeholder, not nothing
`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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
This commit is contained in:
@@ -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::<Option<String>>("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::<Option<String>>("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::<Option<String>>("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::<bool>("return GroupLootFrame1Decoration:IsShown()")
|
||||
@@ -429,7 +443,7 @@ fn nothing_repaints_a_frame_that_opened_before_its_snapshot() {
|
||||
assert_eq!(
|
||||
s.eval::<Option<String>>("return GroupLootFrame1Name:GetText()")
|
||||
.unwrap(),
|
||||
None
|
||||
unpainted
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user