diff --git a/.github/workflows/update visual snapshots.yml b/.github/workflows/update visual snapshots.yml index 8ad9af272a6..84b7ae6d29c 100644 --- a/.github/workflows/update visual snapshots.yml +++ b/.github/workflows/update visual snapshots.yml @@ -48,9 +48,7 @@ jobs: luarocks install --lua-version=5.1 busted - name: Update snapshots - run: npm run lua-test - env: - UPDATE_SNAPSHOTS: true + run: npm run update-snapshots - name: Commit and push if snapshots changed uses: stefanzweifel/git-auto-commit-action@v7 diff --git a/lua/.busted b/lua/.busted index d000e48628c..15103aec682 100644 --- a/lua/.busted +++ b/lua/.busted @@ -9,4 +9,8 @@ return { ci = { ROOT = {"spec"}, }, + snapshots = { + ROOT = {"spec"}, + tags = "snapshot", + } } diff --git a/lua/spec/date_range_display_spec.lua b/lua/spec/date_range_display_spec.lua index 88007770a6b..ab596f68c61 100644 --- a/lua/spec/date_range_display_spec.lua +++ b/lua/spec/date_range_display_spec.lua @@ -1,6 +1,6 @@ --- Triple Comment to Enable our LLS Plugin insulate('DateRange', function() - it('DateRange display test', function() + it('DateRange display test #snapshot', function() local Array = require('Module:Array') local DateRange = require('Module:Widget/Misc/DateRange') local Html = require('Module:Widget/Html') diff --git a/lua/spec/dota2_rankings_spec.lua b/lua/spec/dota2_rankings_spec.lua index cb76aadd85d..11a1f38c162 100644 --- a/lua/spec/dota2_rankings_spec.lua +++ b/lua/spec/dota2_rankings_spec.lua @@ -1,6 +1,6 @@ --- Triple Comment to Enable our LLS Plugin insulate('Rankings', function() - it('dota2', function() + it('dota2 #snapshot', function() local TeamTemplateMock = require('wikis.commons.Mock.TeamTemplate') local TestAsset = require('test_assets/dota2_rankings_example') TeamTemplateMock.setUp() diff --git a/lua/spec/helpers/template.html b/lua/spec/helpers/template.html index f6cf89ebb6e..65565a229e1 100644 --- a/lua/spec/helpers/template.html +++ b/lua/spec/helpers/template.html @@ -4,8 +4,7 @@ Liquipedia - - + diff --git a/lua/spec/infobox_spec.lua b/lua/spec/infobox_spec.lua index 81626a6317e..2adceb5c488 100644 --- a/lua/spec/infobox_spec.lua +++ b/lua/spec/infobox_spec.lua @@ -1,7 +1,7 @@ --- Triple Comment to Enable our LLS Plugin insulate('Infobox', function() insulate('League', function () - allwikis('smoke', function (args, wikiName) + allwikis('smoke #snapshot', function (args, wikiName) local LpdbSquadStub = stub(mw.ext.LiquipediaDB, 'lpdb_tournament') local LpdbQueryStub = stub(mw.ext.LiquipediaDB, 'lpdb', {}) local InfoboxLeagueCustom = require('Module:Infobox/League/Custom') diff --git a/lua/spec/league_icon_spec.lua b/lua/spec/league_icon_spec.lua index 67d9103a212..67f378c2e7b 100644 --- a/lua/spec/league_icon_spec.lua +++ b/lua/spec/league_icon_spec.lua @@ -121,7 +121,7 @@ insulate('LeagueIcon.getTemplate', function() end) insulate('LeagueIcon.generate', function() - it('should generate code with valid arguments', function() + it('should generate code with valid arguments #snapshot', function() local args = {icon = 'Icon.png', link = 'link', name = 'name', series = 'series'} GoldenTest('LeagueIcon.generate_copy_paste_gen', tostring(LeagueIcon.generate(args))) end) diff --git a/lua/spec/match2_spec.lua b/lua/spec/match2_spec.lua index 218835f98d1..e088598990d 100644 --- a/lua/spec/match2_spec.lua +++ b/lua/spec/match2_spec.lua @@ -56,7 +56,7 @@ describe('match2', function() mw.ext.LiquipediaDB.lpdb_match2game:revert() mw.ext.LiquipediaDB.lpdb_tournament:revert() end) - allwikis('smoketest', function(args, wikiName) + allwikis('smoketest #snapshot', function(args, wikiName) local Info = require('Module:Info') if Info.config.match2.status == 0 then return diff --git a/lua/spec/prize_pool_spec.lua b/lua/spec/prize_pool_spec.lua index d1540f69ff0..a8079b0e8ea 100644 --- a/lua/spec/prize_pool_spec.lua +++ b/lua/spec/prize_pool_spec.lua @@ -195,7 +195,7 @@ describe('prize pool', function() end) describe('prize pool is correct', function() - it('display', function() + it('display #snapshot', function() GoldenTest('prize_pool', tostring(PrizePool(prizePoolArgs):create():build())) local clubShareNoStore = Table.merge(clubSharePoolArgs, {storelpdb = false}) GoldenTest('prize_pool_club_share', tostring(PrizePool(clubShareNoStore):create():build())) diff --git a/lua/spec/slider_spec.lua b/lua/spec/slider_spec.lua index 3e76dbde6e1..17f86c12496 100644 --- a/lua/spec/slider_spec.lua +++ b/lua/spec/slider_spec.lua @@ -2,15 +2,17 @@ local Slider = require('Module:Widget/Basic/Slider') insulate('Slider', function() - GoldenTest('Slider', tostring(Slider{ - id = 'test-slider', - min = 0, - max = 10, - step = 2, - defaultValue = 4, - title = function(value) return 'Title ' .. value end, - childrenAtValue = function(value) - return 'Child ' .. value - end, - })) + it("Slider #snapshot", function () + GoldenTest('Slider', tostring(Slider{ + id = 'test-slider', + min = 0, + max = 10, + step = 2, + defaultValue = 4, + title = function(value) return 'Title ' .. value end, + childrenAtValue = function(value) + return 'Child ' .. value + end, + })) + end) end) diff --git a/lua/spec/snapshots/LeagueIcon.generate_copy_paste_gen.png b/lua/spec/snapshots/LeagueIcon.generate_copy_paste_gen.png index f7d4f4f5f82..4a0b96d70e4 100644 Binary files a/lua/spec/snapshots/LeagueIcon.generate_copy_paste_gen.png and b/lua/spec/snapshots/LeagueIcon.generate_copy_paste_gen.png differ diff --git a/lua/spec/snapshots/Slider.png b/lua/spec/snapshots/Slider.png index 37491c62b57..c82442165f7 100644 Binary files a/lua/spec/snapshots/Slider.png and b/lua/spec/snapshots/Slider.png differ diff --git a/lua/spec/snapshots/date range display.png b/lua/spec/snapshots/date range display.png index 10617de2c64..a56ce8ab6f6 100644 Binary files a/lua/spec/snapshots/date range display.png and b/lua/spec/snapshots/date range display.png differ diff --git a/lua/spec/snapshots/dota2 rankings.png b/lua/spec/snapshots/dota2 rankings.png index e61cb14992e..1cb5d633baf 100644 Binary files a/lua/spec/snapshots/dota2 rankings.png and b/lua/spec/snapshots/dota2 rankings.png differ diff --git a/lua/spec/snapshots/infobox_league_apexlegends.png b/lua/spec/snapshots/infobox_league_apexlegends.png index 233f01a9aeb..309415dbd86 100644 Binary files a/lua/spec/snapshots/infobox_league_apexlegends.png and b/lua/spec/snapshots/infobox_league_apexlegends.png differ diff --git a/lua/spec/snapshots/infobox_league_counterstrike.png b/lua/spec/snapshots/infobox_league_counterstrike.png index 0341ac21dd6..e2de28c429c 100644 Binary files a/lua/spec/snapshots/infobox_league_counterstrike.png and b/lua/spec/snapshots/infobox_league_counterstrike.png differ diff --git a/lua/spec/snapshots/infobox_league_dota2.png b/lua/spec/snapshots/infobox_league_dota2.png index 5bc43aff940..65b551a6a39 100644 Binary files a/lua/spec/snapshots/infobox_league_dota2.png and b/lua/spec/snapshots/infobox_league_dota2.png differ diff --git a/lua/spec/snapshots/infobox_league_leagueoflegends.png b/lua/spec/snapshots/infobox_league_leagueoflegends.png index 0341ac21dd6..e2de28c429c 100644 Binary files a/lua/spec/snapshots/infobox_league_leagueoflegends.png and b/lua/spec/snapshots/infobox_league_leagueoflegends.png differ diff --git a/lua/spec/snapshots/infobox_league_mobilelegends.png b/lua/spec/snapshots/infobox_league_mobilelegends.png index 0341ac21dd6..e2de28c429c 100644 Binary files a/lua/spec/snapshots/infobox_league_mobilelegends.png and b/lua/spec/snapshots/infobox_league_mobilelegends.png differ diff --git a/lua/spec/snapshots/infobox_league_overwatch.png b/lua/spec/snapshots/infobox_league_overwatch.png index 5f4f4242ddd..2d46f38c218 100644 Binary files a/lua/spec/snapshots/infobox_league_overwatch.png and b/lua/spec/snapshots/infobox_league_overwatch.png differ diff --git a/lua/spec/snapshots/infobox_league_rainbowsix.png b/lua/spec/snapshots/infobox_league_rainbowsix.png index 00bbe611b18..5a30d912136 100644 Binary files a/lua/spec/snapshots/infobox_league_rainbowsix.png and b/lua/spec/snapshots/infobox_league_rainbowsix.png differ diff --git a/lua/spec/snapshots/infobox_league_rocketleague.png b/lua/spec/snapshots/infobox_league_rocketleague.png index 0341ac21dd6..e2de28c429c 100644 Binary files a/lua/spec/snapshots/infobox_league_rocketleague.png and b/lua/spec/snapshots/infobox_league_rocketleague.png differ diff --git a/lua/spec/snapshots/infobox_league_starcraft2.png b/lua/spec/snapshots/infobox_league_starcraft2.png index 365beb690b6..5e800ef5cfe 100644 Binary files a/lua/spec/snapshots/infobox_league_starcraft2.png and b/lua/spec/snapshots/infobox_league_starcraft2.png differ diff --git a/lua/spec/snapshots/infobox_league_valorant.png b/lua/spec/snapshots/infobox_league_valorant.png index 0341ac21dd6..e2de28c429c 100644 Binary files a/lua/spec/snapshots/infobox_league_valorant.png and b/lua/spec/snapshots/infobox_league_valorant.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_apexlegends.png b/lua/spec/snapshots/match2_matchlist_smoke_apexlegends.png index 89e1daa1021..ca0670f0d62 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_apexlegends.png and b/lua/spec/snapshots/match2_matchlist_smoke_apexlegends.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_counterstrike.png b/lua/spec/snapshots/match2_matchlist_smoke_counterstrike.png index 12cd3c3c1a2..f1104ed6876 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_counterstrike.png and b/lua/spec/snapshots/match2_matchlist_smoke_counterstrike.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_dota2.png b/lua/spec/snapshots/match2_matchlist_smoke_dota2.png index 12cd3c3c1a2..f1104ed6876 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_dota2.png and b/lua/spec/snapshots/match2_matchlist_smoke_dota2.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_leagueoflegends.png b/lua/spec/snapshots/match2_matchlist_smoke_leagueoflegends.png index 12cd3c3c1a2..f1104ed6876 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_leagueoflegends.png and b/lua/spec/snapshots/match2_matchlist_smoke_leagueoflegends.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_mobilelegends.png b/lua/spec/snapshots/match2_matchlist_smoke_mobilelegends.png index 12cd3c3c1a2..f1104ed6876 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_mobilelegends.png and b/lua/spec/snapshots/match2_matchlist_smoke_mobilelegends.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_overwatch.png b/lua/spec/snapshots/match2_matchlist_smoke_overwatch.png index 12cd3c3c1a2..f1104ed6876 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_overwatch.png and b/lua/spec/snapshots/match2_matchlist_smoke_overwatch.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_rainbowsix.png b/lua/spec/snapshots/match2_matchlist_smoke_rainbowsix.png index 12cd3c3c1a2..f1104ed6876 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_rainbowsix.png and b/lua/spec/snapshots/match2_matchlist_smoke_rainbowsix.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_rocketleague.png b/lua/spec/snapshots/match2_matchlist_smoke_rocketleague.png index 12cd3c3c1a2..f1104ed6876 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_rocketleague.png and b/lua/spec/snapshots/match2_matchlist_smoke_rocketleague.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_starcraft2.png b/lua/spec/snapshots/match2_matchlist_smoke_starcraft2.png index 12cd3c3c1a2..f1104ed6876 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_starcraft2.png and b/lua/spec/snapshots/match2_matchlist_smoke_starcraft2.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_valorant.png b/lua/spec/snapshots/match2_matchlist_smoke_valorant.png index 12cd3c3c1a2..f1104ed6876 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_valorant.png and b/lua/spec/snapshots/match2_matchlist_smoke_valorant.png differ diff --git a/lua/spec/snapshots/prize_pool.png b/lua/spec/snapshots/prize_pool.png index edfa847f289..f93e980b8df 100644 Binary files a/lua/spec/snapshots/prize_pool.png and b/lua/spec/snapshots/prize_pool.png differ diff --git a/lua/spec/snapshots/prize_pool_club_share.png b/lua/spec/snapshots/prize_pool_club_share.png index 7dd8705222f..565e3d1cd0d 100644 Binary files a/lua/spec/snapshots/prize_pool_club_share.png and b/lua/spec/snapshots/prize_pool_club_share.png differ diff --git a/lua/spec/snapshots/squad_row_apexlegends.png b/lua/spec/snapshots/squad_row_apexlegends.png index 29c73b70fba..6e27c48662b 100644 Binary files a/lua/spec/snapshots/squad_row_apexlegends.png and b/lua/spec/snapshots/squad_row_apexlegends.png differ diff --git a/lua/spec/snapshots/squad_row_counterstrike.png b/lua/spec/snapshots/squad_row_counterstrike.png index 29c73b70fba..6e27c48662b 100644 Binary files a/lua/spec/snapshots/squad_row_counterstrike.png and b/lua/spec/snapshots/squad_row_counterstrike.png differ diff --git a/lua/spec/snapshots/squad_row_dota2.png b/lua/spec/snapshots/squad_row_dota2.png index 29c73b70fba..6e27c48662b 100644 Binary files a/lua/spec/snapshots/squad_row_dota2.png and b/lua/spec/snapshots/squad_row_dota2.png differ diff --git a/lua/spec/snapshots/squad_row_leagueoflegends.png b/lua/spec/snapshots/squad_row_leagueoflegends.png index 29c73b70fba..6e27c48662b 100644 Binary files a/lua/spec/snapshots/squad_row_leagueoflegends.png and b/lua/spec/snapshots/squad_row_leagueoflegends.png differ diff --git a/lua/spec/snapshots/squad_row_mobilelegends.png b/lua/spec/snapshots/squad_row_mobilelegends.png index 29c73b70fba..6e27c48662b 100644 Binary files a/lua/spec/snapshots/squad_row_mobilelegends.png and b/lua/spec/snapshots/squad_row_mobilelegends.png differ diff --git a/lua/spec/snapshots/squad_row_overwatch.png b/lua/spec/snapshots/squad_row_overwatch.png index 29c73b70fba..6e27c48662b 100644 Binary files a/lua/spec/snapshots/squad_row_overwatch.png and b/lua/spec/snapshots/squad_row_overwatch.png differ diff --git a/lua/spec/snapshots/squad_row_rocketleague.png b/lua/spec/snapshots/squad_row_rocketleague.png index 29c73b70fba..6e27c48662b 100644 Binary files a/lua/spec/snapshots/squad_row_rocketleague.png and b/lua/spec/snapshots/squad_row_rocketleague.png differ diff --git a/lua/spec/snapshots/squad_row_starcraft2.png b/lua/spec/snapshots/squad_row_starcraft2.png index 29c73b70fba..6e27c48662b 100644 Binary files a/lua/spec/snapshots/squad_row_starcraft2.png and b/lua/spec/snapshots/squad_row_starcraft2.png differ diff --git a/lua/spec/snapshots/squad_row_valorant.png b/lua/spec/snapshots/squad_row_valorant.png index 29c73b70fba..6e27c48662b 100644 Binary files a/lua/spec/snapshots/squad_row_valorant.png and b/lua/spec/snapshots/squad_row_valorant.png differ diff --git a/lua/spec/snapshots/standings_legend.png b/lua/spec/snapshots/standings_legend.png index a6b06d35b8b..1e434a82159 100644 Binary files a/lua/spec/snapshots/standings_legend.png and b/lua/spec/snapshots/standings_legend.png differ diff --git a/lua/spec/snapshots/tabs_dynamic_variants.png b/lua/spec/snapshots/tabs_dynamic_variants.png index 2156aa867ef..307324ac61d 100644 Binary files a/lua/spec/snapshots/tabs_dynamic_variants.png and b/lua/spec/snapshots/tabs_dynamic_variants.png differ diff --git a/lua/spec/snapshots/team_participant.png b/lua/spec/snapshots/team_participant.png index 66ff89dbde4..6dd76d139b1 100644 Binary files a/lua/spec/snapshots/team_participant.png and b/lua/spec/snapshots/team_participant.png differ diff --git a/lua/spec/snapshots/teamcard_legacy.png b/lua/spec/snapshots/teamcard_legacy.png index 0ec5530e1d2..d0580b9214b 100644 Binary files a/lua/spec/snapshots/teamcard_legacy.png and b/lua/spec/snapshots/teamcard_legacy.png differ diff --git a/lua/spec/snapshots/transfer_row_apexlegends.png b/lua/spec/snapshots/transfer_row_apexlegends.png index dcb0ad80dff..a73a493b100 100644 Binary files a/lua/spec/snapshots/transfer_row_apexlegends.png and b/lua/spec/snapshots/transfer_row_apexlegends.png differ diff --git a/lua/spec/snapshots/transfer_row_counterstrike.png b/lua/spec/snapshots/transfer_row_counterstrike.png index dcb0ad80dff..a73a493b100 100644 Binary files a/lua/spec/snapshots/transfer_row_counterstrike.png and b/lua/spec/snapshots/transfer_row_counterstrike.png differ diff --git a/lua/spec/snapshots/transfer_row_dota2.png b/lua/spec/snapshots/transfer_row_dota2.png index dcb0ad80dff..a73a493b100 100644 Binary files a/lua/spec/snapshots/transfer_row_dota2.png and b/lua/spec/snapshots/transfer_row_dota2.png differ diff --git a/lua/spec/snapshots/transfer_row_leagueoflegends.png b/lua/spec/snapshots/transfer_row_leagueoflegends.png index 725d6bd6dfb..be8b957975e 100644 Binary files a/lua/spec/snapshots/transfer_row_leagueoflegends.png and b/lua/spec/snapshots/transfer_row_leagueoflegends.png differ diff --git a/lua/spec/snapshots/transfer_row_mobilelegends.png b/lua/spec/snapshots/transfer_row_mobilelegends.png index 725d6bd6dfb..be8b957975e 100644 Binary files a/lua/spec/snapshots/transfer_row_mobilelegends.png and b/lua/spec/snapshots/transfer_row_mobilelegends.png differ diff --git a/lua/spec/snapshots/transfer_row_overwatch.png b/lua/spec/snapshots/transfer_row_overwatch.png index dcb0ad80dff..a73a493b100 100644 Binary files a/lua/spec/snapshots/transfer_row_overwatch.png and b/lua/spec/snapshots/transfer_row_overwatch.png differ diff --git a/lua/spec/snapshots/transfer_row_rainbowsix.png b/lua/spec/snapshots/transfer_row_rainbowsix.png index dcb0ad80dff..a73a493b100 100644 Binary files a/lua/spec/snapshots/transfer_row_rainbowsix.png and b/lua/spec/snapshots/transfer_row_rainbowsix.png differ diff --git a/lua/spec/snapshots/transfer_row_rocketleague.png b/lua/spec/snapshots/transfer_row_rocketleague.png index 725d6bd6dfb..be8b957975e 100644 Binary files a/lua/spec/snapshots/transfer_row_rocketleague.png and b/lua/spec/snapshots/transfer_row_rocketleague.png differ diff --git a/lua/spec/snapshots/transfer_row_starcraft2.png b/lua/spec/snapshots/transfer_row_starcraft2.png index e5ab23fa7fc..e13dda84fad 100644 Binary files a/lua/spec/snapshots/transfer_row_starcraft2.png and b/lua/spec/snapshots/transfer_row_starcraft2.png differ diff --git a/lua/spec/snapshots/transfer_row_valorant.png b/lua/spec/snapshots/transfer_row_valorant.png index dcb0ad80dff..a73a493b100 100644 Binary files a/lua/spec/snapshots/transfer_row_valorant.png and b/lua/spec/snapshots/transfer_row_valorant.png differ diff --git a/lua/spec/squad_spec.lua b/lua/spec/squad_spec.lua index 74bbbc88ca2..ca7a6aaf87d 100644 --- a/lua/spec/squad_spec.lua +++ b/lua/spec/squad_spec.lua @@ -1,6 +1,6 @@ --- Triple Comment to Enable our LLS Plugin insulate('Squad', function() - allwikis('integration tests', function(args, wikiName) + allwikis('integration tests #snapshot', function(args, wikiName) local Info = require('Module:Info') if Info.config.squads.allowManual == false then return diff --git a/lua/spec/standings_legend_spec.lua b/lua/spec/standings_legend_spec.lua index c3028b7420c..7efa82f1f6f 100644 --- a/lua/spec/standings_legend_spec.lua +++ b/lua/spec/standings_legend_spec.lua @@ -1,6 +1,6 @@ --- Triple Comment to Enable our LLS Plugin insulate('Widget/Legend', function() - it('integration', function() + it('integration #snapshot', function() local LegendComponent = require('Module:Widget/Legend') GoldenTest('standings_legend', tostring(LegendComponent{ diff --git a/lua/spec/tabs_snapshot_spec.lua b/lua/spec/tabs_snapshot_spec.lua index ea2af0b93d1..9487bbd347b 100644 --- a/lua/spec/tabs_snapshot_spec.lua +++ b/lua/spec/tabs_snapshot_spec.lua @@ -2,7 +2,7 @@ local Tabs = require('Module:Tabs') local Html = require('Module:Widget/Html') insulate('Tabs snapshots', function() - it('dynamic variants', function() + it('dynamic variants #snapshot', function() local arrayContent = Html.Ul{children = { Html.Li{children = {'Item A1'}}, Html.Li{children = {'Item A2'}}, diff --git a/lua/spec/team_participant_spec.lua b/lua/spec/team_participant_spec.lua index 56dfea1bef7..0f532914502 100644 --- a/lua/spec/team_participant_spec.lua +++ b/lua/spec/team_participant_spec.lua @@ -1,7 +1,7 @@ --- Triple Comment to Enable our LLS Plugin describe('Team Participant', function() insulate('integration tests', function() - it('renders team participants template with multiple teams', function() + it('renders team participants template with multiple teams #snapshot', function() local TeamTemplateMock = require('wikis.commons.Mock.TeamTemplate') TeamTemplateMock.setUp() local LpdbQuery = stub(mw.ext.LiquipediaDB, 'lpdb', function() return {} end) diff --git a/lua/spec/transfer_spec.lua b/lua/spec/transfer_spec.lua index a14d3e43f90..1addae4ef8b 100644 --- a/lua/spec/transfer_spec.lua +++ b/lua/spec/transfer_spec.lua @@ -2,7 +2,7 @@ local Json = require('Module:Json') local TeamTemplateMock = require('wikis.commons.Mock.TeamTemplate') insulate('Transfer', function() - allwikis('smoke', function (args, wikiName) + allwikis('smoke #snapshot', function (args, wikiName) local LpdbTransferStub = stub(mw.ext.LiquipediaDB, 'lpdb_transfer') local LpdbQueryStub = stub(mw.ext.LiquipediaDB, 'lpdb', {}) diff --git a/package.json b/package.json index e0130280365..d0dec507523 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,6 @@ "build:js": "node build-js.js", "build": "npm run build:css && npm run build:js", "lua-test": "npm run build:css && busted -C lua", - "update-snapshots": "UPDATE_SNAPSHOTS=true npm run lua-test" + "update-snapshots": "npm run build:css && UPDATE_SNAPSHOTS=true busted --run=snapshots -C lua" } } diff --git a/stylesheets/Main.scss b/stylesheets/Main.scss index 452b7a8daa2..7dae361f045 100644 --- a/stylesheets/Main.scss +++ b/stylesheets/Main.scss @@ -79,6 +79,9 @@ body { line-height: 1.5; color: #212529; text-align: left; + + /* Wiki-like top padding */ + padding: calc( 3.125rem + 2.25rem ) 0 0 0; } *, @@ -86,3 +89,83 @@ body { ::after { box-sizing: border-box; } + +/* Styles that are not yet part of this repository, but used in snapshot tests */ + +/** Definitely still needed */ +/** For image alignment, especially in transfer rows */ +img { + vertical-align: middle; + border-style: unset; +} + +/** Reevaluate whether still needed: + Disabled to serve as test ground for LH base styles +:root { + --clr-moon-40: #666666; + + --clr-primary-44: #1f73c1; + --clr-primary-100: #ffffff; + + --clr-secondary-25: #404040; + --clr-secondary-80: #b3b3b3; + --clr-secondary-100: #ffffff; + + --clr-semantic-gold-20: #665400; + --clr-semantic-gold-40: #ccab00; + --clr-semantic-gold-90: #fff5cc; + + --clr-semantic-silver-40: #557177; + + --clr-semantic-positive-30: #1d7c1d; + --clr-semantic-negative-40: #b81414; + + --clr-on-surface-light-primary-4: rgba( 0, 0, 0, 0.04 ); + --clr-on-surface-light-primary-8: rgba( 0, 0, 0, 0.08 ); + --clr-on-surface-light-primary-12: rgba( 0, 0, 0, 0.12 ); + + --clr-wiki-theme-primary: var( --clr-moon-40 ); +} + +.wiki-backgroundcolor-light { + background-color: var( --clr-wiki-primary-container ); +} + +.d-none { + display: none !important; +} + +a { + text-decoration: none; + color: var( --clr-primary ); + background-color: transparent; +} + +.main-container .main-content-column { + position: relative; + overflow-x: hidden; +} + +.nav { + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +pre { + border: 1px solid #adb5bd; + page-break-inside: avoid; + font-family: "Source Code Pro", monospace; + font-size: 1em; + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + -ms-overflow-style: scrollbar; + background-color: #f8f9fa; + white-space: pre-wrap; + overflow-x: hidden; + word-wrap: break-word; +} +*/