883 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
28 lines
2.0 KiB
Lua
28 lines
2.0 KiB
Lua
local sent,messages,frames={},{},{}
|
|
SlashCmdList={}
|
|
DEFAULT_CHAT_FRAME={AddMessage=function(_,text)table.insert(messages,text)end}
|
|
C_ChatInfo={SendAddonMessage=function(...)table.insert(sent,{...})end}
|
|
UnitName=function(unit)assert(unit=='player');return 'Fixture'end
|
|
CreateFrame=function()
|
|
local f={RegisterEvent=function()end,SetScript=function(self,_,fn)self.event=fn end}
|
|
table.insert(frames,f);return f
|
|
end
|
|
ChatFrame_AddMessageEventFilter=function(event,fn)assert(event=='CHAT_MSG_SYSTEM');assert(fn(nil,nil,'GWTURTLE1 VISIBILITY helm off confirmed'));assert(not fn(nil,nil,'ordinary'))end
|
|
dofile('client_addons/GatewayDiagnostics/EquipmentVisibility.lua')
|
|
assert(#sent==0)
|
|
SlashCmdList.GWHELM('off')
|
|
assert(#sent==1 and table.concat(sent[1],'|')=='GWTURTLE|visibility helm off|WHISPER|Fixture')
|
|
assert(#messages==0) -- No optimistic confirmation.
|
|
frames[1].event(nil,'CHAT_MSG_SYSTEM','GWTURTLE1 VISIBILITY cloak off confirmed');assert(#messages==0)
|
|
frames[1].event(nil,'CHAT_MSG_SYSTEM','GWTURTLE1 VISIBILITY helm on pending');assert(messages[1]:match('waiting'))
|
|
frames[1].event(nil,'CHAT_MSG_SYSTEM','GWTURTLE1 VISIBILITY helm off confirmed');assert(messages[2]:match('server confirmed'))
|
|
SlashCmdList.GWCLOAK('');assert(sent[2][2]=='visibility cloak toggle')
|
|
SlashCmdList.GWCLOAK('ON');assert(sent[3][2]=='visibility cloak on')
|
|
SlashCmdList.GWCLOAK('status');assert(sent[4][2]=='visibility cloak status')
|
|
SlashCmdList.GWHELM('off trailing');assert(#sent==4)
|
|
frames[1].event(nil,'PLAYER_LEAVING_WORLD')
|
|
local n=#messages;frames[1].event(nil,'CHAT_MSG_SYSTEM','GWTURTLE1 VISIBILITY cloak on confirmed');assert(#messages==n)
|
|
SlashCmdList.GWHELM('on');frames[1].event(nil,'CHAT_MSG_SYSTEM','GWTURTLE1 VISIBILITY unavailable');assert(messages[#messages]:match('unavailable'))
|
|
C_ChatInfo=nil;SlashCmdList.GWHELM('off');assert(#sent==5 and messages[#messages]:match('unavailable'))
|
|
print('PASS owned slash transport; no optimistic state; pending/confirmed/unavailable/lifetime status')
|