Trophies shows trophy wins via user page trophy display Renders/u/:identifier /u/:identifier
User page Arrange
Create trophy name “Wellstring Wednesday” → trophy
const trophy = await factories.TrophyFactory .create ({ name: TROPHY_NAME });Play trophy tournament trophy id trophy.id → tournament
const tournament = await playTrophyTournament (factories, {
trophyId: trophy.id,
});Grant user Sendou widgets id “trophies-owned”
await factories.UserFactory .grant (ADMIN_ID , {
widgets: [{ id: "trophies-owned" }],
});User page Act
Open the user page Sendou
await userPage.goto (ADMIN_ID );Get by test id “trophy-display” → display
const display = page.getByTestId ("trophy-display" );Assert
display is visible
await expect (display).toBeVisible ();Act
Click display.getByRole ("button" , { name: TROPHY_NAME })
await display.getByRole ("button" , { name: TROPHY_NAME }).click ();Assert
text “View trophy page” is visible
await expect (page.getByText ("View trophy page" )).toBeVisible ();dialog › `a[href^='/to/${tournament.id}']` is visible
await expect (
page.getByRole ("dialog" ).locator (`a[href^='/to/${tournament.id}']` ),
).toBeVisible ();Source test ("shows trophy wins via user page trophy display" , async ({
page,
factories,
}) => {
test.slow ();
const trophy = await factories.TrophyFactory .create ({ name: TROPHY_NAME });
const tournament = await playTrophyTournament (factories, {
trophyId: trophy.id,
});
await factories.UserFactory .grant (ADMIN_ID , {
widgets: [{ id: "trophies-owned" }],
});
await impersonate (page, NZAP_TEST_ID );
const userPage = new UserPage (page);
await userPage.goto (ADMIN_ID );
const display = page.getByTestId ("trophy-display" );
await expect (display).toBeVisible ();
await display.getByRole ("button" , { name: TROPHY_NAME }).click ();
await expect (page.getByText ("View trophy page" )).toBeVisible ();
await expect (
page.getByRole ("dialog" ).locator (`a[href^='/to/${tournament.id}']` ),
).toBeVisible ();
})browses trophy details from the trophies list Renders/trophies /trophies/:id
Trophies page Trophy details page Trophies page Trophy details page Arrange
the trophy's series, so that the next edition of it shows a tentative tier
Create tournament organization name “Sendou's Tournaments” owner Sendou series name “Wellstring Wednesday” description null show leaderboard false → organization
const organization = await factories.TournamentOrganizationFactory .create (
{ name: ORGANIZATION_NAME , ownerId: ADMIN_ID },
{
series: [
{ name: TROPHY_NAME , description: null , showLeaderboard: false },
],
},
);Create trophy name “Wellstring Wednesday” → trophy
const trophy = await factories.TrophyFactory .create ({ name: TROPHY_NAME });Create trophy name “Chris P. Bacon” → otherTrophy
const otherTrophy = await factories.TrophyFactory .create ({
name: "Chris P. Bacon" ,
});Play trophy tournament trophy id trophy.id organization id organization.id
await playTrophyTournament (factories, {
trophyId: trophy.id,
organizationId: organization.id,
});Create tournament name `${TROPHY_NAME} 2` author Sendou organization id organization.id start times dateToDatabaseTimestamp (addDays (new Date (), UPCOMING_IN_DAYS )) trophy id trophy.id → upcoming
const upcoming = await factories.TournamentFactory .create ({
name: `${TROPHY_NAME} 2` ,
authorId: ADMIN_ID ,
organizationId: organization.id,
startTimes: [
dateToDatabaseTimestamp (addDays (new Date (), UPCOMING_IN_DAYS )),
],
trophyId: trophy.id,
});Trophies page Act
Open the trophies page
await trophies.goto ();Assert
count is more than 1
expect (await trophies.locators.trophyLinks.count ()).toBeGreaterThan (1 );Act
Search “Chris P”
await trophies.search ("Chris P" );Assert
trophy links count is 1
await expect (trophies.locators.trophyLinks).toHaveCount (1 );Act
Open first → details
const details = await trophies.openFirst ();Assert
the page URL is `/trophies/${otherTrophy.id}`
await expect (page).toHaveURL (`/trophies/${otherTrophy.id}` );Trophy details page Assert
owners heading is visible
await expect (details.locators.ownersHeading).toBeVisible ();Trophies page Act
Search “Wellstring”
await trophies.search ("Wellstring" );Assert
tentative tier trophy.id is visible
await expect (trophies.tentativeTier (trophy.id)).toBeVisible ();upcoming pill trophy.id is visible
await expect (trophies.upcomingPill (trophy.id)).toBeVisible ();Act
Click tile trophy.id
await trophies.tile (trophy.id).click ();Trophy details page Assert
first owner links is visible
await expect (details.locators.ownerLinks.first ()).toBeVisible ();Act
Tournament row upcoming.id → upcomingRow
const upcomingRow = details.tournamentRow (upcoming.id);Assert
upcomingRow.getByText ("Upcoming" ) is visible
await expect (upcomingRow.getByText ("Upcoming" )).toBeVisible ();upcomingRow.getByText (`in ${UPCOMING_IN_DAYS} days` ) is visible
await expect (
upcomingRow.getByText (`in ${UPCOMING_IN_DAYS} days` ),
).toBeVisible ();Source test ("browses trophy details from the trophies list" , async ({
page,
factories,
}) => {
test.slow ();
// the trophy's series, so that the next edition of it shows a tentative tier
const organization = await factories.TournamentOrganizationFactory .create (
{ name: ORGANIZATION_NAME , ownerId: ADMIN_ID },
{
series: [
{ name: TROPHY_NAME , description: null , showLeaderboard: false },
],
},
);
const trophy = await factories.TrophyFactory .create ({ name: TROPHY_NAME });
const otherTrophy = await factories.TrophyFactory .create ({
name: "Chris P. Bacon" ,
});
await playTrophyTournament (factories, {
trophyId: trophy.id,
organizationId: organization.id,
});
const upcoming = await factories.TournamentFactory .create ({
name: `${TROPHY_NAME} 2` ,
authorId: ADMIN_ID ,
organizationId: organization.id,
startTimes: [
dateToDatabaseTimestamp (addDays (new Date (), UPCOMING_IN_DAYS )),
],
trophyId: trophy.id,
});
await impersonate (page, NZAP_TEST_ID );
const trophies = new TrophiesPage (page);
await trophies.goto ();
expect (await trophies.locators.trophyLinks.count ()).toBeGreaterThan (1 );
await trophies.search ("Chris P" );
await expect (trophies.locators.trophyLinks).toHaveCount (1 );
const details = await trophies.openFirst ();
await expect (page).toHaveURL (`/trophies/${otherTrophy.id}` );
await expect (details.locators.ownersHeading).toBeVisible ();
await trophies.search ("Wellstring" );
await expect (trophies.tentativeTier (trophy.id)).toBeVisible ();
await expect (trophies.upcomingPill (trophy.id)).toBeVisible ();
await trophies.tile (trophy.id).click ();
await expect (details.locators.ownerLinks.first ()).toBeVisible ();
const upcomingRow = details.tournamentRow (upcoming.id);
await expect (upcomingRow.getByText ("Upcoming" )).toBeVisible ();
await expect (
upcomingRow.getByText (`in ${UPCOMING_IN_DAYS} days` ),
).toBeVisible ();
})submits a new trophy after agreeing to terms Renders/trophies/new
New trophy page Pending trophy list Arrange
Create tournament organization name “Sendou's Tournaments” owner Sendou
await factories.TournamentOrganizationFactory .create ({
name: ORGANIZATION_NAME ,
ownerId: ADMIN_ID ,
});New trophy page Act
Open the new trophy page
await newTrophy.goto ();Assert
name input is not visible
await isNotVisible (newTrophy.locators.nameInput);Act
Agree to terms
await newTrophy.agreeToTerms ();Fill form name “E2E Test Trophy” organization name “Sendou's Tournaments” model decompressFromBase64 (factories.TrophyFactory .MODELS [0 ]) ?? ""
await newTrophy.fillForm ({
name: "E2E Test Trophy" ,
organizationName: ORGANIZATION_NAME ,
model: decompressFromBase64 (factories.TrophyFactory .MODELS [0 ]) ?? "" ,
});Save
await newTrophy.save ();Open pending → pending
const pending = await newTrophy.openPending ();Pending trophy list Assert
row “E2E Test Trophy” is visible
await expect (pending.row ("E2E Test Trophy" )).toBeVisible ();Source test ("submits a new trophy after agreeing to terms" , async ({
page,
factories,
}) => {
await factories.TournamentOrganizationFactory .create ({
name: ORGANIZATION_NAME ,
ownerId: ADMIN_ID ,
});
await impersonate (page);
const newTrophy = new NewTrophyPage (page);
await newTrophy.goto ();
await isNotVisible (newTrophy.locators.nameInput);
await newTrophy.agreeToTerms ();
await newTrophy.fillForm ({
name: "E2E Test Trophy" ,
organizationName: ORGANIZATION_NAME ,
model: decompressFromBase64 (factories.TrophyFactory .MODELS [0 ]) ?? "" ,
});
await newTrophy.save ();
const pending = await newTrophy.openPending ();
await expect (pending.row ("E2E Test Trophy" )).toBeVisible ();
})Renders/ /trophies/new
New trophy page Notification popover Pending trophy list Notification popover Pending trophy list Notification popover New trophy page Pending trophy list Notification popover Arrange
Create tournament organization name “Sendou's Tournaments” owner N-ZAP → organization
const organization = await factories.TournamentOrganizationFactory .create ({
name: ORGANIZATION_NAME ,
ownerId: NZAP_TEST_ID ,
});approvedName = "Approved Trophy"
const approvedName = "Approved Trophy" ;declinedName = "Declined Trophy"
const declinedName = "Declined Trophy" ;For each name of approvedName, declinedName
for (const name of [approvedName, declinedName]) {
await factories.TrophyFactory .createPending ({
name,
organizationId: organization.id,
submitterUserId: NZAP_TEST_ID ,
});
await factories.NotificationFactory .create ({
notification: {
type : "TROPHY_SUBMITTED" ,
meta: { trophyName: name, submitterUsername: "N-ZAP" },
},
users: [{ userId: ADMIN_ID }],
});
}Create pending trophy name organization id organization.id submitter N-ZAP
await factories.TrophyFactory .createPending ({
name,
organizationId: organization.id,
submitterUserId: NZAP_TEST_ID ,
});Create notification notification type “TROPHY_SUBMITTED” meta trophy name name submitter username “N-ZAP” users user Sendou
await factories.NotificationFactory .create ({
notification: {
type : "TROPHY_SUBMITTED" ,
meta: { trophyName: name, submitterUsername: "N-ZAP" },
},
users: [{ userId: ADMIN_ID }],
});New trophy page Act
Open the new trophy page
await newTrophy.goto ();Open pending → pending
const pending = await newTrophy.openPending ();Notification popover Assert
bell dot is visible
await expect (notifications.locators.bellDot).toBeVisible ();Pending trophy list Act
Approve approvedName
await pending.approve (approvedName);Assert
row approvedName › text `1/${TROPHY_APPROVALS_REQUIRED} approvals` is visible
await expect (
pending
.row (approvedName)
.getByText (`1/${TROPHY_APPROVALS_REQUIRED} approvals` ),
).toBeVisible ();Notification popover Assert
approving resolved that submission's notification, but the other submission still waits for a review
bell dot is visible
await expect (notifications.locators.bellDot).toBeVisible ();Pending trophy list Act
Decline declinedName, “Does not meet the requirements”
await pending.decline (declinedName, "Does not meet the requirements" );Assert
row declinedName is not visible
await isNotVisible (pending.row (declinedName));Notification popover Assert
with the last pending submission reviewed nothing needs attention anymore
bell dot is hidden
await expect (notifications.locators.bellDot).toBeHidden ();New trophy page Act
Open reviewed → reviewed
const reviewed = await newTrophy.openReviewed ();Pending trophy list Assert
row declinedName is visible
await expect (reviewed.row (declinedName)).toBeVisible ();row declinedName › text “Declined by Sendou” is visible
await expect (
reviewed.row (declinedName).getByText ("Declined by Sendou" ),
).toBeVisible ();Act
Go to “/”
await navigate ({ page, url: "/" });Notification popover Act
Open
await notifications.open ();Assert
notification `Your trophy ${declinedName} was declined` is visible
await expect (
notifications.notification (`Your trophy ${declinedName} was declined` ),
).toBeVisible ();Source test ("reviews pending trophies" , async ({ page, factories }) => {
const organization = await factories.TournamentOrganizationFactory .create ({
name: ORGANIZATION_NAME ,
ownerId: NZAP_TEST_ID ,
});
const approvedName = "Approved Trophy" ;
const declinedName = "Declined Trophy" ;
for (const name of [approvedName, declinedName]) {
await factories.TrophyFactory .createPending ({
name,
organizationId: organization.id,
submitterUserId: NZAP_TEST_ID ,
});
await factories.NotificationFactory .create ({
notification: {
type : "TROPHY_SUBMITTED" ,
meta: { trophyName: name, submitterUsername: "N-ZAP" },
},
users: [{ userId: ADMIN_ID }],
});
}
await impersonate (page);
const newTrophy = new NewTrophyPage (page);
await newTrophy.goto ();
const pending = await newTrophy.openPending ();
const notifications = new NotificationPopover (page);
await expect (notifications.locators.bellDot).toBeVisible ();
await pending.approve (approvedName);
await expect (
pending
.row (approvedName)
.getByText (`1/${TROPHY_APPROVALS_REQUIRED} approvals` ),
).toBeVisible ();
// approving resolved that submission's notification, but the other
// submission still waits for a review
await expect (notifications.locators.bellDot).toBeVisible ();
await pending.decline (declinedName, "Does not meet the requirements" );
await isNotVisible (pending.row (declinedName));
// with the last pending submission reviewed nothing needs attention anymore
await expect (notifications.locators.bellDot).toBeHidden ();
const reviewed = await newTrophy.openReviewed ();
await expect (reviewed.row (declinedName)).toBeVisible ();
await expect (
reviewed.row (declinedName).getByText ("Declined by Sendou" ),
).toBeVisible ();
// declining notified the submitter
await impersonate (page, NZAP_TEST_ID );
await navigate ({ page, url: "/" });
await notifications.open ();
await expect (
notifications.notification (`Your trophy ${declinedName} was declined` ),
).toBeVisible ();
})backfills a trophy to the winners of a past tournament Renders/trophies /trophies/:id /trophies/new
New trophy page Trophy backfill section Trophies page Trophy details page Arrange
seriesName = "Wellstring"
const seriesName = "Wellstring" ;Create tournament organization name “Sendou's Tournaments” owner Sendou series name seriesName description null show leaderboard false → organization
const organization = await factories.TournamentOrganizationFactory .create (
{ name: ORGANIZATION_NAME , ownerId: ADMIN_ID },
{
series: [
{ name: seriesName, description: null , showLeaderboard: false },
],
},
);Create trophy name “Wellstring Wednesday” organization id organization.id manager Sendou → trophy
const trophy = await factories.TrophyFactory .create ({
name: TROPHY_NAME ,
organizationId: organization.id,
managerId: ADMIN_ID ,
});awardedName = `${TROPHY_NAME} 1`
const awardedName = `${TROPHY_NAME} 1` ;skippedName = `${TROPHY_NAME} 2`
const skippedName = `${TROPHY_NAME} 2` ;Play trophy tournament organization id organization.id name awardedName → awarded
const awarded = await playTrophyTournament (factories, {
organizationId: organization.id,
name: awardedName,
});Play trophy tournament organization id organization.id name skippedName → skipped
const skipped = await playTrophyTournament (factories, {
organizationId: organization.id,
name: skippedName,
});New trophy page Act
Open the new trophy page
await newTrophy.goto ();Open backfill → backfill
const backfill = await newTrophy.openBackfill ();Trophy backfill section Act
Select trophy “Wellstring Wednesday”
await backfill.selectTrophy (TROPHY_NAME );Select series seriesName
await backfill.selectSeries (seriesName);Toggle tournament awardedName
await backfill.toggleTournament (awardedName);Toggle winner tournament name awardedName username “Sendou”
await backfill.toggleWinner ({
tournamentName: awardedName,
username: "Sendou" ,
});Award
await backfill.award ();Assert
an awarded tournament can't be backfilled again
tournament awardedName is not visible
await isNotVisible (backfill.tournament (awardedName));tournament skippedName is visible
await expect (backfill.tournament (skippedName)).toBeVisible ();Trophies page Act
Go to trophy trophy.id → details
const details = await new TrophiesPage (page).gotoTrophy (trophy.id);Trophy details page Assert
tournament row awarded.id is visible
await expect (details.tournamentRow (awarded.id)).toBeVisible ();tournament row skipped.id is not visible
await isNotVisible (details.tournamentRow (skipped.id));owner “N-ZAP” is visible
await expect (details.owner ("N-ZAP" )).toBeVisible ();owner “Sendou” is not visible
await isNotVisible (details.owner ("Sendou" ));Source test ("backfills a trophy to the winners of a past tournament" , async ({
page,
factories,
}) => {
test.slow ();
const seriesName = "Wellstring" ;
const organization = await factories.TournamentOrganizationFactory .create (
{ name: ORGANIZATION_NAME , ownerId: ADMIN_ID },
{
series: [
{ name: seriesName, description: null , showLeaderboard: false },
],
},
);
const trophy = await factories.TrophyFactory .create ({
name: TROPHY_NAME ,
organizationId: organization.id,
managerId: ADMIN_ID ,
});
const awardedName = `${TROPHY_NAME} 1` ;
const skippedName = `${TROPHY_NAME} 2` ;
const awarded = await playTrophyTournament (factories, {
organizationId: organization.id,
name: awardedName,
});
const skipped = await playTrophyTournament (factories, {
organizationId: organization.id,
name: skippedName,
});
await impersonate (page);
const newTrophy = new NewTrophyPage (page);
await newTrophy.goto ();
const backfill = await newTrophy.openBackfill ();
await backfill.selectTrophy (TROPHY_NAME );
await backfill.selectSeries (seriesName);
await backfill.toggleTournament (awardedName);
await backfill.toggleWinner ({
tournamentName: awardedName,
username: "Sendou" ,
});
await backfill.award ();
// an awarded tournament can't be backfilled again
await isNotVisible (backfill.tournament (awardedName));
await expect (backfill.tournament (skippedName)).toBeVisible ();
const details = await new TrophiesPage (page).gotoTrophy (trophy.id);
await expect (details.tournamentRow (awarded.id)).toBeVisible ();
await isNotVisible (details.tournamentRow (skipped.id));
await expect (details.owner ("N-ZAP" )).toBeVisible ();
await isNotVisible (details.owner ("Sendou" ));
})awards X Power trophies per weapon category Renders/trophies /trophies/:id /u/:identifier /u/:identifier
Trophies page Trophy details page User page Arrange
SPLATTERSHOT = 40
const SPLATTERSHOT = 40 ;SPLASH_O_MATIC = 20
const SPLASH_O_MATIC = 20 ;SPLAT_CHARGER = 2010
const SPLAT_CHARGER = 2010 ;For each [weaponSplId, power, region] of SPLATTERSHOT , 3550 , “WEST” , SPLATTERSHOT , 3510 , “JPN” , SPLASH_O_MATIC , 3120 , “WEST” , SPLAT_CHARGER , 3050 , “WEST”
for (const [weaponSplId, power, region] of [
[SPLATTERSHOT , 3550 , "WEST" ],
[SPLATTERSHOT , 3510 , "JPN" ],
[SPLASH_O_MATIC , 3120 , "WEST" ],
[SPLAT_CHARGER , 3050 , "WEST" ],
] as const ) {
await factories.XRankPlacementFactory .create ({
playerUserId: NZAP_TEST_ID ,
weaponSplId,
power,
region,
});
}Create X rank placement player N-ZAP weaponSplId power region
await factories.XRankPlacementFactory .create ({
playerUserId: NZAP_TEST_ID ,
weaponSplId,
power,
region,
});Create xp trophies trophy
await factories.TrophyFactory .createXpTrophies ();Grant user N-ZAP widgets id “trophies-owned”
await factories.UserFactory .grant (NZAP_TEST_ID , {
widgets: [{ id: "trophies-owned" }],
});Trophies page Act
Open the trophies page
await trophies.goto ();Open xp trophy “3500 X Power Shooters” → details
const details = await trophies.openXpTrophy ("3500 X Power Shooters" );Trophy details page Assert
owner “N-ZAP” is visible
await expect (details.owner ("N-ZAP" )).toBeVisible ();the Splash-o-matic placement fell short of 3500
weapon counts count is 1
await expect (details.locators.weaponCounts).toHaveCount (1 );User page Act
Open the user page N-ZAP
await userPage.goto (NZAP_TEST_ID );Assert
trophy display › button count is 2
await expect (
userPage.locators.trophyDisplay.getByRole ("button" ),
).toHaveCount (2 );reached in both divisions, Takoroka is the one shown
trophy division “3500 X Power Shooters” , “Takoroka” is visible
await expect (
userPage.trophyDivision ("3500 X Power Shooters" , "Takoroka" ),
).toBeVisible ();trophy division “3000 X Power Chargers” , “Tentatek” is visible
await expect (
userPage.trophyDivision ("3000 X Power Chargers" , "Tentatek" ),
).toBeVisible ();Act
Open trophy “3500 X Power Shooters”
await userPage.openTrophy ("3500 X Power Shooters" );Assert
trophy placement rows count is 3
await expect (userPage.locators.trophyPlacementRows).toHaveCount (3 );Source test ("awards X Power trophies per weapon category" , async ({
page,
factories,
}) => {
const SPLATTERSHOT = 40 ;
const SPLASH_O_MATIC = 20 ;
const SPLAT_CHARGER = 2010 ;
for (const [weaponSplId, power, region] of [
[SPLATTERSHOT , 3550 , "WEST" ],
[SPLATTERSHOT , 3510 , "JPN" ],
[SPLASH_O_MATIC , 3120 , "WEST" ],
[SPLAT_CHARGER , 3050 , "WEST" ],
] as const ) {
await factories.XRankPlacementFactory .create ({
playerUserId: NZAP_TEST_ID ,
weaponSplId,
power,
region,
});
}
await factories.TrophyFactory .createXpTrophies ();
await factories.UserFactory .grant (NZAP_TEST_ID , {
widgets: [{ id: "trophies-owned" }],
});
await impersonate (page, NZAP_TEST_ID );
const trophies = new TrophiesPage (page);
await trophies.goto ();
const details = await trophies.openXpTrophy ("3500 X Power Shooters" );
await expect (details.owner ("N-ZAP" )).toBeVisible ();
// the Splash-o-matic placement fell short of 3500
await expect (details.locators.weaponCounts).toHaveCount (1 );
const userPage = new UserPage (page);
await userPage.goto (NZAP_TEST_ID );
await expect (
userPage.locators.trophyDisplay.getByRole ("button" ),
).toHaveCount (2 );
// reached in both divisions, Takoroka is the one shown
await expect (
userPage.trophyDivision ("3500 X Power Shooters" , "Takoroka" ),
).toBeVisible ();
await expect (
userPage.trophyDivision ("3000 X Power Chargers" , "Tentatek" ),
).toBeVisible ();
await userPage.openTrophy ("3500 X Power Shooters" );
await expect (userPage.locators.trophyPlacementRows).toHaveCount (3 );
})playTrophyTournamente2e/trophies.spec.ts:328
No JSDoc
async function playTrophyTournament (
factories: Factories ,
{
trophyId,
organizationId,
name = `${TROPHY_NAME} 1` ,
}: { trophyId?: number ; organizationId?: number ; name?: string },
) {
// the top seed wins, so the anchor users are on it and end up owning the trophy
const players = await factories.UserFactory .createMany (
TEAM_COUNT * ROSTER_SIZE - 2 ,
);
const ids = [ADMIN_ID , NZAP_TEST_ID , ...players.map ((player) => player.id)];
const teamRosters = Array .from ({ length: TEAM_COUNT }, (_, i) =>
// … UserPage.gotoe2e/pages/user/user-page.ts:35
No JSDoc
async goto (userId: number ) {
await navigate ({ page: this .page, url: userPage ({ id: userId }) });
}UserPagee2e/pages/user/user-page.ts:12
No JSDoc
TrophiesPage.gotoe2e/pages/trophies/trophies-page.ts:20
No JSDoc
async goto () {
await navigate ({ page: this .page, url: TROPHIES_PAGE });
}TrophiesPage.locators.trophyLinkse2e/pages/trophies/trophies-page.ts:15
No JSDoc
page.locator ("main" ).locator ("a[href^='/trophies/']" ) TrophiesPage.searche2e/pages/trophies/trophies-page.ts:25
search (query: string ) {
return this .locators.searchInput.fill (query);
}TrophiesPage.openFirste2e/pages/trophies/trophies-page.ts:49
No JSDoc
async openFirst () {
await this .locators.trophyLinks.first ().click ();
return new TrophyDetailsPage (this .page);
}TrophyDetailsPage.locators.ownersHeadinge2e/pages/trophies/trophies-page.ts:68
No JSDoc
page.getByText ("Owners" , { exact: true }) TrophiesPage.tentativeTiere2e/pages/trophies/trophies-page.ts:33
No JSDoc
tentativeTier (trophyId: number ) {
return this .tile (trophyId).getByTestId ("tentative-tier" );
}TrophiesPage.upcomingPille2e/pages/trophies/trophies-page.ts:38
upcomingPill (trophyId: number ) {
return this .tile (trophyId).getByTestId ("trophy-corner-pill" );
}TrophiesPage.tilee2e/pages/trophies/trophies-page.ts:29
No JSDoc
tile (trophyId: number ) {
return this .page.locator (`a[href='${trophyPage(trophyId)}']` );
}TrophyDetailsPage.locators.ownerLinkse2e/pages/trophies/trophies-page.ts:69
No JSDoc
page.locator ("main" ).locator ("a[href^='/u/']" ) TrophyDetailsPage.tournamentRowe2e/pages/trophies/trophies-page.ts:80
No JSDoc
tournamentRow (tournamentId: number ) {
return this .page.locator ("main" ).locator (`a[href='/to/${tournamentId}']` );
}TrophiesPagee2e/pages/trophies/trophies-page.ts:6
TrophyDetailsPagee2e/pages/trophies/trophies-page.ts:61
NewTrophyPage.gotoe2e/pages/trophies/new-trophy-page.ts:28
No JSDoc
async goto () {
await navigate ({ page: this .page, url: NEW_TROPHY_PAGE });
}NewTrophyPage.locators.nameInpute2e/pages/trophies/new-trophy-page.ts:17
No JSDoc
page.getByLabel ("Name" ).first () isNotVisiblee2e/helpers/playwright.ts:745
No JSDoc
export function isNotVisible (locator: Locator ) {
return expect (locator).toHaveCount (0 );
}NewTrophyPage.agreeToTermse2e/pages/trophies/new-trophy-page.ts:33
agreeToTerms () {
return this .locators.agreeToTermsButton.click ();
}NewTrophyPage.fillForme2e/pages/trophies/new-trophy-page.ts:37
No JSDoc
async fillForm ({
name,
organizationName,
model,
}: {
name: string ;
organizationName: string ;
model: string ;
}) {
await this .locators.nameInput.fill (name);
await this .page.getByRole ("button" , { name: /organization/i }).click ();
await this .page
.getByTestId ("organization-search-input" )
// … NewTrophyPage.savee2e/pages/trophies/new-trophy-page.ts:61
No JSDoc
save () {
return submit (this .page);
}NewTrophyPage.openPendinge2e/pages/trophies/new-trophy-page.ts:70
No JSDoc
async openPending () {
await this .locators.pendingTab.click ();
return new PendingTrophyList (this .page);
}PendingTrophyList.rowe2e/pages/trophies/new-trophy-page.ts:89
No JSDoc
row (trophyName: string ) {
// the other list stays mounted in a hidden tab panel
return this .page
.getByRole ("tabpanel" )
.getByTestId ("pending-trophy" )
.filter ({ hasText: trophyName });
}NewTrophyPagee2e/pages/trophies/new-trophy-page.ts:10
PendingTrophyListe2e/pages/trophies/new-trophy-page.ts:82
NotificationPopover.locators.bellDote2e/pages/layout/notification-popover.ts:29
this .page.getByTestId ("notifications-bell-dot" )PendingTrophyList.approvee2e/pages/trophies/new-trophy-page.ts:97
No JSDoc
approve (trophyName: string ) {
return waitForPOSTResponse (this .page, () =>
this .row (trophyName).getByRole ("button" , { name: "Approve" }).click (),
);
}PendingTrophyList.declinee2e/pages/trophies/new-trophy-page.ts:103
No JSDoc
async decline (trophyName: string , reason: string ) {
await this .row (trophyName).getByRole ("button" , { name: "Decline" }).click ();
const dialog = this .page.getByRole ("dialog" );
await dialog.locator ("textarea" ).fill (reason);
await waitForPOSTResponse (this .page, () =>
dialog.getByRole ("button" , { name: "Decline" }).click (),
);
}NewTrophyPage.openReviewede2e/pages/trophies/new-trophy-page.ts:75
No JSDoc
async openReviewed () {
await this .locators.reviewedTab.click ();
return new PendingTrophyList (this .page);
}NotificationPopover.opene2e/pages/layout/notification-popover.ts:37
No JSDoc
async open () {
// the popover is closed on navigation, which would also close one opened
// after a click on a notification navigated but before the page rendered
await waitForNavigationRendered (this .page);
await expect (this .locators.shownPopover).toHaveCount (0 );
await this .locators.openButton.click ();
await expect (this .locators.shownPopover).toHaveCount (1 );
}NotificationPopover.notificatione2e/pages/layout/notification-popover.ts:50
No JSDoc
notification (text: string ) {
return this .locators.items.filter ({ hasText: text });
}NotificationPopovere2e/pages/layout/notification-popover.ts:6
NewTrophyPage.openBackfille2e/pages/trophies/new-trophy-page.ts:65
No JSDoc
async openBackfill () {
await this .locators.manageTab.click ();
return new TrophyBackfillSection (this .page);
}TrophyBackfillSection.selectTrophye2e/pages/trophies/new-trophy-page.ts:128
No JSDoc
async selectTrophy (name: string ) {
await this .locators.trophySelect.click ();
await this .page.getByRole ("option" , { name, exact: true }).click ();
}TrophyBackfillSection.selectSeriese2e/pages/trophies/new-trophy-page.ts:133
No JSDoc
async selectSeries (name: string ) {
await this .locators.seriesSelect.click ();
await this .page.getByRole ("option" , { name, exact: true }).click ();
}TrophyBackfillSection.toggleTournamente2e/pages/trophies/new-trophy-page.ts:144
No JSDoc
toggleTournament (name: string ) {
return this .tournament (name)
.getByRole ("switch" , { name, exact: true })
.click ({ force: true });
}TrophyBackfillSection.toggleWinnere2e/pages/trophies/new-trophy-page.ts:150
No JSDoc
toggleWinner ({
tournamentName,
username,
}: {
tournamentName: string ;
username: string ;
}) {
return this .tournament (tournamentName)
.getByRole ("switch" , { name: username, exact: true })
.click ({ force: true });
}TrophyBackfillSection.awarde2e/pages/trophies/new-trophy-page.ts:162
No JSDoc
async award () {
await this .locators.awardButton.click ();
await waitForPOSTResponse (this .page, () =>
this .page.getByTestId ("confirm-button" ).click (),
);
}TrophyBackfillSection.tournamente2e/pages/trophies/new-trophy-page.ts:138
No JSDoc
tournament (name: string ) {
return this .page
.getByTestId ("backfill-tournament" )
.filter ({ hasText: name });
}TrophiesPage.gotoTrophye2e/pages/trophies/trophies-page.ts:54
No JSDoc
async gotoTrophy (trophyId: number ) {
await navigate ({ page: this .page, url: trophyPage (trophyId) });
return new TrophyDetailsPage (this .page);
}TrophyDetailsPage.ownere2e/pages/trophies/trophies-page.ts:74
No JSDoc
owner (username: string ) {
return this .page
.getByTestId ("trophy-owners" )
.getByRole ("link" , { name: username, exact: true });
}TrophyBackfillSectione2e/pages/trophies/new-trophy-page.ts:115
No JSDoc
TrophiesPage.openXpTrophye2e/pages/trophies/trophies-page.ts:42
No JSDoc
async openXpTrophy (name: string ) {
await this .locators.xpSection
.getByRole ("link" , { name, exact: true })
.click ();
return new TrophyDetailsPage (this .page);
}TrophyDetailsPage.locators.weaponCountse2e/pages/trophies/trophies-page.ts:70
No JSDoc
page.getByTestId ("trophy-weapons" ).getByRole ("listitem" ) UserPage.locators.trophyDisplaye2e/pages/user/user-page.ts:28
No JSDoc
page.getByTestId ("trophy-display" ) UserPage.trophyDivisione2e/pages/user/user-page.ts:50
No JSDoc
trophyDivision (trophyName: string , divisionName: string ) {
return this .locators.trophyDisplay
.getByRole ("button" , { name: trophyName, exact: true })
.getByTestId ("trophy-corner-pill" )
.getByAltText (divisionName)
.filter ({ visible: true });
}UserPage.openTrophye2e/pages/user/user-page.ts:44
No JSDoc
openTrophy (name: string ) {
return this .locators.trophyDisplay
.getByRole ("button" , { name, exact: true })
.click ();
}UserPage.locators.trophyPlacementRowse2e/pages/user/user-page.ts:29
No JSDoc
page
.getByRole ("dialog" )
.getByTestId ("trophy-placement" )