Skip to content

wowlua v0.9.6

Choose a tag to compare

@github-actions github-actions released this 22 Oct 09:22
· 835 commits to main since this release

0.9.6 (2026-10-22)

New

  • Collections in tests: mock.setMounts, mock.setToys and mock.setAppearances give the account its mounts, toys and collected appearances, and a world profile can hold them (mounts, toys, appearances). The mount journal, the toy box and the wardrobe then answer from them as the game does (their filters, search, favourites and events, recorded from the game), so a collections window can be tested without stubbing every journal call. /stdtest snapshot records them from your character.
  • Tests: choose the machine the game runs on with "test": { "platform": "windows" } in wowlua.json, or config({ platform = "windows" }) in one test file. Key names (GetBindingText: "Delete" on Windows, "Del" on a Mac), graphics and sound answers and IsMacClient/IsWindowsClient follow it. The Mac stays the default.
  • Tests: choose the screen the game draws on with "test": { "screen": { "width": 2560, "height": 1440 } } in wowlua.json, or config({ screen = { ... } }) in one test file, with an optional dpiScale and uiScale ("Use UI Scale" on). UIParent's size and scale, GetScreenWidth and GetPhysicalScreenSize follow it. The default is 1920 by 1080.
  • Tests: mock.setField(t, key, value) sets any field, nil included, until the test ends, and puts it back untainted as mock.stub does. Taking a frame or a game API away with an assignment instead leaves Blizzard's field tainted for the rest of the file.
  • A new warning, W2061: a and nil or b (or false in the middle) always gives b, since the nil makes the or take over. Write an if, or not a and b or nil when b is never nil or false. It found three such bugs in real code.

Changed

  • Tests: mock.drag(frame, dx, dy) and mock.sizeBy(grip, dw, dh) move by screen units, as GetCursorPosition counts them: a distance in the frame's own units times its GetEffectiveScale(). Since UIParent now has the screen's UI scale (0.71 by default), a test that dragged by frame units moves the frame further than before: multiply its distances by the frame's effective scale.

Fixed

  • The dev console's error list: clicking an open error closes it again (it stayed open).
  • Tests: C_QuestLog.GetQuestsOnMap lists the quests in your character's log, as in the game. It listed quests of the character wowlua was recorded with, which your test's character didn't have (no title, not in the log).
  • Tests: a table you pass to mock.fireEvent or mock.fireUnitEvent ({ isFullUpdate = true }) reaches Blizzard's code as the game's own would, without your addon's taint. Blizzard's buff frame no longer errors in combat ("Auras cannot be accessed when secret while tainted") after a test fires UNIT_AURA.
  • Tests: talents open at level 5 as in the game: C_SpecializationInfo.CanPlayerUseTalentUI() and CanPlayerUseTalentSpecUI() follow your character's level, so Blizzard's spells window opens its Talents tab for a character of level 5 and up. They stayed "available at level 5" whatever the level.
  • Tests: a group made with mock.group:add is a group you made yourself, not a dungeon finder's: IsInGroup(LE_PARTY_CATEGORY_INSTANCE), IsInRaid(LE_PARTY_CATEGORY_INSTANCE) and GetNumGroupMembers(LE_PARTY_CATEGORY_INSTANCE) say none. They ignored the category, so an addon picked INSTANCE_CHAT for its party messages and they were refused.
  • Tests: UnitFullName("player") gives your realm as its second value, as in the game, so your addon recognizes its own messages (sent as Name-Realm). It gave nil.
  • Tests: worn gear can be given its durability in a strictly typed test: mock.player:equip(slot, { id, durability, maxDurability }) (the fields were read but not declared).
  • Tests: a button of yours made with SecureHandlerClickTemplate runs its _onclick snippet when clicked (mock.click), as in the game. Blizzard's handler failed with "Invalid 'self' frame handle" and the snippet never ran.
  • Tests: text is as wide and as tall as in the game. GetStringWidth, GetUnboundedStringWidth, wrapping, truncation and SetTextToFit measure each character with the game's own fonts (Friz Quadrata, Arial Narrow, Skurri and Morpheus), at the size the game draws them on your test's screen. They used a guess per character, so text-sized frames and wrapped lines were off.
  • Tests: UIParent:GetScale() and every frame's GetEffectiveScale() include the screen's UI scale as in the game (0.71 on a 1920 by 1080 screen; it was 1). A frame that ignores its parent's scale (SetIgnoreParentScale(true)) or has no parent is now placed, sized and measured as in the game: one at UIParent's scale lines up with UIParent and its text is as wide.
  • Tests: every atlas of the game is known, as the game has it (its own tables): C_Texture.GetAtlasInfo gives its size, file, texture coordinates, tiling and rawSize, C_Texture.GetAtlasExists tells, and a texture set with useAtlasSize takes its size. An atlas the game lacks gives nothing, as in the game; before, any atlas wowlua had not recorded was a 64 by 64 whole texture, and Blizzard's quest log errored ("Division by zero") on one sized 0.
  • Tests: map positions match the game's (C_Map.GetMapPosFromWorldPos with an override map, Azeroth's world map, GetWorldPosFromMapPos), and the game's second Eastern Kingdoms and Kalimdor maps (1463, 1464) exist.
  • Tests: C_GameRules.IsGameRuleActive answers every game rule as the game does, and the artifact ranks cost what they do in the game up to rank 10.
  • Tests: some errors read as the game words them: a CreateAbbreviateConfig divisor that is not a power of ten, and infinity passed to a widget's number (on Windows "must be a finite number").
  • Tests: C_TransmogCollection.GetAppearanceSources(appearanceID) without a category gives the appearance's sources, as in the game (it gave nothing), and a source has its item's name and quality once the item is loaded.
  • Tests: a key bound to a button with SetBindingClick or SetOverrideBindingClick clicks it once, as in the game: only for the clicks it registered (by default the left button's release). It clicked on both the key's press and release, so a toggle opened and closed at once.
  • Tests: a model's or actor's GetItemTransmogInfoList() has an entry for every slot, so Blizzard's dressing room no longer errors ("attempt to index local 'mainHandInfo'").
  • Tests: mock.slash runs Blizzard's own slash commands (/inspect and the others the game keeps in its own lists), which it silently skipped: with Blizzard's UI the line is typed into the chat and sent, as you do in the game, so an unknown command also gets the game's help line.
  • Tests: GetText(token, gender) gives the global string by its name (a woman's form for gender 3), as in the game; it gave nothing.
  • Tests: mock.spawnUnit and mock.setPlayer take healthMax and powerMax as declared (they were ignored: the unit's maximum was its current health). The types now know every unit field the engine reads (factionGroup, pvp, classification, the creature's type and family) and every unit method (joinGroup, loot, openTrade, setInspect, setThreat, useSpell), so strict tests can use them.
  • Tests: an inspected player's gear has its item ID, icon and quality (GetInventoryItemID, GetInventoryItemTexture, GetInventoryItemQuality), not only its link.
  • wowlua test --coverage no longer crashes with "internal compiler error: stale handle" when code it counts (a Blizzard frame's or your addon's) is thrown away during the run.
  • An internal compiler error prints where it happened when RUST_BACKTRACE=1 is set, for the bug report.