diff --git a/spec/golden_masters/transfer_row_apexlegends.txt b/spec/golden_masters/transfer_row_apexlegends.txt index 6577d778cf4..30207c09fb2 100644 --- a/spec/golden_masters/transfer_row_apexlegends.txt +++ b/spec/golden_masters/transfer_row_apexlegends.txt @@ -1 +1 @@ -
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
[[File:Team Liquid 2024 lightmode.png|100x50px|middle|Team Liquid|link=Team Liquid]][[File:Team Liquid 2024 darkmode.png|100x50px|middle|Team Liquid|link=Team Liquid]]
[[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]][[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]]
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file +
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
 None 
 None 
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file diff --git a/spec/golden_masters/transfer_row_counterstrike.txt b/spec/golden_masters/transfer_row_counterstrike.txt index 6577d778cf4..30207c09fb2 100644 --- a/spec/golden_masters/transfer_row_counterstrike.txt +++ b/spec/golden_masters/transfer_row_counterstrike.txt @@ -1 +1 @@ -
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
[[File:Team Liquid 2024 lightmode.png|100x50px|middle|Team Liquid|link=Team Liquid]][[File:Team Liquid 2024 darkmode.png|100x50px|middle|Team Liquid|link=Team Liquid]]
[[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]][[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]]
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file +
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
 None 
 None 
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file diff --git a/spec/golden_masters/transfer_row_dota2.txt b/spec/golden_masters/transfer_row_dota2.txt index 6577d778cf4..30207c09fb2 100644 --- a/spec/golden_masters/transfer_row_dota2.txt +++ b/spec/golden_masters/transfer_row_dota2.txt @@ -1 +1 @@ -
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
[[File:Team Liquid 2024 lightmode.png|100x50px|middle|Team Liquid|link=Team Liquid]][[File:Team Liquid 2024 darkmode.png|100x50px|middle|Team Liquid|link=Team Liquid]]
[[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]][[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]]
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file +
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
 None 
 None 
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file diff --git a/spec/golden_masters/transfer_row_leagueoflegends.txt b/spec/golden_masters/transfer_row_leagueoflegends.txt index 6577d778cf4..30207c09fb2 100644 --- a/spec/golden_masters/transfer_row_leagueoflegends.txt +++ b/spec/golden_masters/transfer_row_leagueoflegends.txt @@ -1 +1 @@ -
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
[[File:Team Liquid 2024 lightmode.png|100x50px|middle|Team Liquid|link=Team Liquid]][[File:Team Liquid 2024 darkmode.png|100x50px|middle|Team Liquid|link=Team Liquid]]
[[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]][[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]]
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file +
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
 None 
 None 
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file diff --git a/spec/golden_masters/transfer_row_mobilelegends.txt b/spec/golden_masters/transfer_row_mobilelegends.txt index 6577d778cf4..30207c09fb2 100644 --- a/spec/golden_masters/transfer_row_mobilelegends.txt +++ b/spec/golden_masters/transfer_row_mobilelegends.txt @@ -1 +1 @@ -
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
[[File:Team Liquid 2024 lightmode.png|100x50px|middle|Team Liquid|link=Team Liquid]][[File:Team Liquid 2024 darkmode.png|100x50px|middle|Team Liquid|link=Team Liquid]]
[[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]][[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]]
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file +
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
 None 
 None 
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file diff --git a/spec/golden_masters/transfer_row_overwatch.txt b/spec/golden_masters/transfer_row_overwatch.txt index 6577d778cf4..30207c09fb2 100644 --- a/spec/golden_masters/transfer_row_overwatch.txt +++ b/spec/golden_masters/transfer_row_overwatch.txt @@ -1 +1 @@ -
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
[[File:Team Liquid 2024 lightmode.png|100x50px|middle|Team Liquid|link=Team Liquid]][[File:Team Liquid 2024 darkmode.png|100x50px|middle|Team Liquid|link=Team Liquid]]
[[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]][[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]]
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file +
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
 None 
 None 
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file diff --git a/spec/golden_masters/transfer_row_rainbowsix.txt b/spec/golden_masters/transfer_row_rainbowsix.txt new file mode 100644 index 00000000000..c1fd11e6ef7 --- /dev/null +++ b/spec/golden_masters/transfer_row_rainbowsix.txt @@ -0,0 +1 @@ +
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
 None 
 None 
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file diff --git a/spec/golden_masters/transfer_row_rocketleague.txt b/spec/golden_masters/transfer_row_rocketleague.txt index 6577d778cf4..30207c09fb2 100644 --- a/spec/golden_masters/transfer_row_rocketleague.txt +++ b/spec/golden_masters/transfer_row_rocketleague.txt @@ -1 +1 @@ -
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
[[File:Team Liquid 2024 lightmode.png|100x50px|middle|Team Liquid|link=Team Liquid]][[File:Team Liquid 2024 darkmode.png|100x50px|middle|Team Liquid|link=Team Liquid]]
[[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]][[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]]
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file +
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
 None 
 None 
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file diff --git a/spec/golden_masters/transfer_row_starcraft2.txt b/spec/golden_masters/transfer_row_starcraft2.txt index 6577d778cf4..9bc6ea4dc12 100644 --- a/spec/golden_masters/transfer_row_starcraft2.txt +++ b/spec/golden_masters/transfer_row_starcraft2.txt @@ -1 +1 @@ -
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
[[File:Team Liquid 2024 lightmode.png|100x50px|middle|Team Liquid|link=Team Liquid]][[File:Team Liquid 2024 darkmode.png|100x50px|middle|Team Liquid|link=Team Liquid]]
[[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]][[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]]
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file +
2024-10-11
[[File:fr_hd.png|36x24px|France|link=]][[File:Terran race icon.png|link=|17px|Terran]][[Clem|Clem]]
 None 
 None 
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file diff --git a/spec/golden_masters/transfer_row_valorant.txt b/spec/golden_masters/transfer_row_valorant.txt index 6577d778cf4..30207c09fb2 100644 --- a/spec/golden_masters/transfer_row_valorant.txt +++ b/spec/golden_masters/transfer_row_valorant.txt @@ -1 +1 @@ -
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
[[File:Team Liquid 2024 lightmode.png|100x50px|middle|Team Liquid|link=Team Liquid]][[File:Team Liquid 2024 darkmode.png|100x50px|middle|Team Liquid|link=Team Liquid]]
[[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]][[File:Mousesports 2016 allmode.png|100x50px|middle|mousesports|link=mousesports]]
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file +
2024-10-11
[[File:us_hd.png|36x24px|United States|link=]][[Supr|supr]]
 None 
 None 
[https://x.com/streamerzone_gg/status/1844766204742832441 ]
\ No newline at end of file diff --git a/spec/transfer_spec.lua b/spec/transfer_spec.lua index 0b6f2a0004c..4a590a9e8c1 100644 --- a/spec/transfer_spec.lua +++ b/spec/transfer_spec.lua @@ -6,6 +6,7 @@ insulate('Transfer', function() local LpdbQueryStub = stub(mw.ext.LiquipediaDB, 'lpdb', {}) local TransferCustom = require('Module:TransferRow/Custom') + -- this can not check for the proper display until we have a team template fake for testing purposes GoldenTest('transfer_row_' .. wikiName, tostring(TransferCustom.transfer(args.input))) for _, row in ipairs(args.lpdbExpected) do @@ -17,49 +18,103 @@ insulate('Transfer', function() LpdbTransferStub:revert() LpdbQueryStub:revert() - end, {default = { - input = { - name = 'supr', - team1 = 'team liquid', - team2 = 'mouz', - date = '2024-10-11', - ref = Json.stringify{ - url = 'https://x.com/streamerzone_gg/status/1844766204742832441', - type = 'web source', + end, { + default = { + input = { + name = 'supr', + flag = 'us', + team1 = 'team liquid', + team2 = 'mouz', + date = '2024-10-11', + ref = Json.stringify{ + url = 'https://x.com/streamerzone_gg/status/1844766204742832441', + type = 'web source', + }, }, + -- due to team template extension not having a fake yet some values are left as empty string instead of what would be on the wikis + lpdbExpected = { + { + objectname = 'transfer_2024-10-11_000000', + player = 'Supr', + nationality = 'us', + fromteam = '', --'Team Liquid', + toteam = '', --'mousesports', + fromteamtemplate = '', --'team liquid 2024', + toteamtemplate = '', --'mousesports', + reference = Json.stringify{ + reference1 = 'https://x.com/streamerzone_gg/status/1844766204742832441', + reference1type = 'web source', + }, + date = '2024-10-11', -- '2024-10-11 00:00:00' + wholeteam = 0, + extradata = Json.stringify{ + platform = '', + icontype = '', + sortindex = 0, + displaydate = '2024-10-11', + fromteamsectemplate = '', + displayname = 'supr', + chars = {}, + role1sec = '', + role2sec = '', + toteamsectemplate = '', + position = '', + icon2 = '', + toteamsec = '', + icon = '', + fromteamsec = '', + }, + } + } }, - lpdbExpected = { - { - player = 'Supr', - nationality = 'United States', - fromteam = 'Team Liquid', - toteam = 'mousesports', - fromteamtemplate = 'team liquid 2024', - toteamtemplate = 'mousesports', - reference = { - reference1 = 'https://x.com/streamerzone_gg/status/1844766204742832441', - reference1type = 'web source', - }, - date = '2024-10-11 00:00:00', - wholeteam = 0, - extradata = { - platform = '', - icontype = '', - sortindex = 0, - displaydate = '2024-10-11', - fromteamsectemplate = '', - displayname = 'supr', - chars = {}, - role1sec = '', - role2sec = '', - toteamsectemplate = '', - position = '', - icon2 = '', - toteamsec = '', - icon = '', - fromteamsec = '', + starcraft2 = { + input = { + name = 'Clem', + flag = 'fr', + faction = 't', + team1 = 'team liquid', + team2 = 'mouz', + date = '2024-10-11', + ref = Json.stringify{ + url = 'https://x.com/streamerzone_gg/status/1844766204742832441', + type = 'web source', }, + }, + lpdbExpected = { + { + objectname = 'transfer_2024-10-11_000000', + player = 'Clem', + nationality = 'fr', + fromteam = '', --'Team Liquid', + toteam = '', --'mousesports', + fromteamtemplate = '', --'team liquid 2024', + toteamtemplate = '', --'mousesports', + reference = Json.stringify{ + reference1 = 'https://x.com/streamerzone_gg/status/1844766204742832441', + reference1type = 'web source', + }, + date = '2024-10-11', -- '2024-10-11 00:00:00' + wholeteam = 0, + extradata = Json.stringify{ + platform = '', + icontype = '', + sortindex = 0, + displaydate = '2024-10-11', + fromteamsectemplate = '', + displayname = 'Clem', + chars = {}, + role1sec = '', + role2sec = '', + toteamsectemplate = '', + position = '', + icon2 = '', + toteamsec = '', + icon = '', + fromteamsec = '', + faction = 't', + }, + } } - } - }}) + }, + }) end)