shows qualified players, teams and X Battle placements across the leaderboard views and the season boundary
Renders/leaderboards
- Seed leaderboards
await seedLeaderboards(factories);
- Open the leaderboards page
await leaderboards.goto();
- no error page
await expectNoErrorPage(page);
top ten renders in the showcase format, the 11th entry as a normal row
entry name “Jared” is visibleawait expect( leaderboards.entryName(TOP_TEN_FIRST_PLACE_NAME), ).toBeVisible();
- entry name “Tail Ender 3” is visible
await expect(leaderboards.entryName("Tail Ender 3")).toBeVisible();
- update info text is visible
await expect(leaderboards.locators.updateInfoText).toBeVisible();
N-ZAP has the highest rating of the pool but one match too few to qualify
entry name “N-ZAP” is not visibleawait isNotVisible(leaderboards.entryName("N-ZAP"));
weapon category leaderboard only has the player with enough reported weapons
Click filter chip “Shooters”await leaderboards.filterChip("Shooters").click();
- entry name “Sendou” is visible
await expect(leaderboards.entryName("Sendou")).toBeVisible();
- entry name “Alpha Mate 1” is not visible
await isNotVisible(leaderboards.entryName("Alpha Mate 1"));
- Click tab “Teams”
await leaderboards.tab("Teams").click();
- no error page
await expectNoErrorPage(page);
- entry name “Alpha Mate 1” is visible
await expect(leaderboards.entryName("Alpha Mate 1")).toBeVisible();
- entry name “Bravo Foe 4” is visible
await expect(leaderboards.entryName("Bravo Foe 4")).toBeVisible();
- Click filter chip “All rosters”
await leaderboards.filterChip("All rosters").click();
- filter chip radio “All rosters” is checked
await expect(leaderboards.filterChipRadio("All rosters")).toBeChecked();
- entry name “Alpha Mate 1” is visible
await expect(leaderboards.entryName("Alpha Mate 1")).toBeVisible();
- entry name “Bravo Foe 4” is visible
await expect(leaderboards.entryName("Bravo Foe 4")).toBeVisible();
- Click tab “X Battle”
await leaderboards.tab("X Battle").click();
- no error page
await expectNoErrorPage(page);
- entry name “XP Zones Ace” is visible
await expect(leaderboards.entryName("XP Zones Ace")).toBeVisible();
- entry name “XP Tower Ace” is visible
await expect(leaderboards.entryName("XP Tower Ace")).toBeVisible();
- Click filter chip “Tower Control”
await leaderboards.filterChip("Tower Control").click();
- entry name “XP Zones Ace” is not visible
await isNotVisible(leaderboards.entryName("XP Zones Ace"));
- entry name “XP Tower Ace” is visible
await expect(leaderboards.entryName("XP Tower Ace")).toBeVisible();
- Select XP weapon “Splattershot”
await leaderboards.selectXPWeapon("Splattershot");
- entry name “XP Tower Ace” is not visible
await isNotVisible(leaderboards.entryName("XP Tower Ace"));
- entry name “XP Zones Ace” is visible
await expect(leaderboards.entryName("XP Zones Ace")).toBeVisible();
once the season ends the page defaults to the previous, empty season
End seasonawait endSeason(page);
- Open the leaderboards page
await leaderboards.goto();
- no error page
await expectNoErrorPage(page);
- no players text is visible
await expect(leaderboards.locators.noPlayersText).toBeVisible();
the ended season stays browsable via the season select, now finalized
Select season 1await leaderboards.selectSeason(CURRENT_SEASON);
- entry name “Jared” is visible
await expect( leaderboards.entryName(TOP_TEN_FIRST_PLACE_NAME), ).toBeVisible();
- entry name “Tail Ender 3” is visible
await expect(leaderboards.entryName("Tail Ender 3")).toBeVisible();
Source
test("shows qualified players, teams and X Battle placements across the leaderboard views and the season boundary", async ({ page, factories, }) => { await seedLeaderboards(factories); const leaderboards = new LeaderboardsPage(page); await leaderboards.goto(); await expectNoErrorPage(page); // top ten renders in the showcase format, the 11th entry as a normal row await expect( leaderboards.entryName(TOP_TEN_FIRST_PLACE_NAME), ).toBeVisible(); await expect(leaderboards.entryName("Tail Ender 3")).toBeVisible(); await expect(leaderboards.locators.updateInfoText).toBeVisible(); // N-ZAP has the highest rating of the pool but one match too few to qualify await isNotVisible(leaderboards.entryName("N-ZAP")); // weapon category leaderboard only has the player with enough reported weapons await leaderboards.filterChip("Shooters").click(); await expect(leaderboards.entryName("Sendou")).toBeVisible(); await isNotVisible(leaderboards.entryName("Alpha Mate 1")); await leaderboards.tab("Teams").click(); await expectNoErrorPage(page); await expect(leaderboards.entryName("Alpha Mate 1")).toBeVisible(); await expect(leaderboards.entryName("Bravo Foe 4")).toBeVisible(); await leaderboards.filterChip("All rosters").click(); await expect(leaderboards.filterChipRadio("All rosters")).toBeChecked(); await expect(leaderboards.entryName("Alpha Mate 1")).toBeVisible(); await expect(leaderboards.entryName("Bravo Foe 4")).toBeVisible(); await leaderboards.tab("X Battle").click(); await expectNoErrorPage(page); await expect(leaderboards.entryName("XP Zones Ace")).toBeVisible(); await expect(leaderboards.entryName("XP Tower Ace")).toBeVisible(); await leaderboards.filterChip("Tower Control").click(); await isNotVisible(leaderboards.entryName("XP Zones Ace")); await expect(leaderboards.entryName("XP Tower Ace")).toBeVisible(); await leaderboards.selectXPWeapon("Splattershot"); await isNotVisible(leaderboards.entryName("XP Tower Ace")); await expect(leaderboards.entryName("XP Zones Ace")).toBeVisible(); // once the season ends the page defaults to the previous, empty season await endSeason(page); await leaderboards.goto(); await expectNoErrorPage(page); await expect(leaderboards.locators.noPlayersText).toBeVisible(); // the ended season stays browsable via the season select, now finalized await leaderboards.selectSeason(CURRENT_SEASON); await expect( leaderboards.entryName(TOP_TEN_FIRST_PLACE_NAME), ).toBeVisible(); await expect(leaderboards.entryName("Tail Ender 3")).toBeVisible(); })