Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified lua/spec/snapshots/teamcard_legacy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions lua/spec/teamcard_legacy_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,14 @@ describe('TeamCard Legacy', function()
c1 = 'Coach Name',
qualifier = 'Invited',
}, 'LegacyTeamCard')
Template.stashReturnValue({
__source = 'card',
team = 'mouz',
team2 = 'g2',
team3 = 'bds',
defaultRowNumber = '5',
qualifier = '[[Qualifier/2025|Qualifier]]',
}, 'LegacyTeamCard')
Template.stashReturnValue({
__source = 'card',
team = 'mouz',
Expand Down
41 changes: 41 additions & 0 deletions lua/test_assets/team_template_data.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
local aliases = {
bds = 'team bds',
['bds esport'] = 'team bds',
g2 = 'g2 esports',
gamers2 = 'g2 esports',
mousesports = 'mouz',
skt = 't1',
['sk telecom t1'] = 't1',
Expand All @@ -17,6 +19,12 @@ local data = {
['2020-02-12'] = 'exon feb 2020',
['2020-03-10'] = 'exon march 2020',
},
['g2 esports'] = {
['0000-01-01'] = 'gamers2 orig',
['2015-01-26'] = 'gamers2 2015',
['2015-10-15'] = 'g2 esports 2015',
['2019-01-14'] = 'g2 esports 2019',
},
['team bds'] = {
['0000-01-01'] = 'bds esport old',
['2019-09-01'] = 'team bds orig',
Expand Down Expand Up @@ -288,6 +296,39 @@ local data = {
templatename = "heroic 2024",
},
-- g2 subtemplate
['gamers2 orig'] = {
bracketname = "Gamers2",
image = "Gamers2 allmode.png",
imagedark = "Gamers2 allmode.png",
legacyimage = "",
legacyimagedark = "",
name = "Gamers2",
page = "Gamers2",
shortname = "G2",
templatename = "gamers2 orig",
},
['gamers2 2015'] = {
bracketname = "Gamers2",
image = "Gamers2 lightmode.png",
imagedark = "Gamers2 darkmode.png",
legacyimage = "",
legacyimagedark = "",
name = "Gamers2",
page = "Gamers2",
shortname = "G2",
templatename = "gamers2 2015",
},
['g2 esports 2015'] = {
bracketname = "G2 Esports",
image = "G2 Esports allmode.png",
imagedark = "G2 Esports allmode.png",
legacyimage = "",
legacyimagedark = "",
name = "G2 Esports",
page = "G2 Esports",
shortname = "G2",
templatename = "g2 esports 2015",
},
['g2 esports 2019'] = {
bracketname = "G2 Esports",
image = "G2 Esports 2019 lightmode.png",
Expand Down
2 changes: 1 addition & 1 deletion lua/wikis/commons/TeamParticipants/Parse/Wiki.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function TeamParticipantsWikiParser.parseParticipant(input, defaultDate)
table.insert(warnings, 'Invalid contenders: expected a list of non-empty strings')
else
Array.forEach(contenderNames, function(name, idx)
if type(name) ~= 'string' or name == '' then
if type(name) ~= 'string' or String.isEmpty(name) or string.lower(name) == 'tbd' then
table.insert(warnings, string.format('Invalid contender entry at position %d: %s', idx, tostring(name)))
return
end
Expand Down