Broadcast casts a match, takes scenes, edits the queue and holds next Broadcast dashboard page Tournament match page Broadcast dashboard page Arrange
Create broadcasting author N-ZAP is match cast false → tournament
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
isMatchCast: false ,
});Broadcast dashboard page Act
Open the broadcast dashboard page
await dashboard.goto ();Assert
no featured match is visible
await expect (dashboard.locators.noFeaturedMatch).toBeVisible ();Tournament match page Act
Open the tournament match page tournament id tournament.id match id tournament.matchId
await match.goto ({
tournamentId: tournament.id,
matchId: tournament.matchId,
});Open tab “admin”
await match.openTab ("admin" );Set casted by “broadcast_cast”
await match.setCastedBy (CAST_ACCOUNT );Broadcast dashboard page Act
Open the broadcast dashboard page
await dashboard.goto ();Assert
featured match contains “Team 1”
await expect (dashboard.locators.featuredMatch).toContainText ("Team 1" );featured match contains “Team 2”
await expect (dashboard.locators.featuredMatch).toContainText ("Team 2" );view heading “live” , “rosters” is visible
await expect (dashboard.viewHeading ("live" , "rosters" )).toBeVisible ();view heading “next” , “game” is visible
await expect (dashboard.viewHeading ("next" , "game" )).toBeVisible ();on game start is visible
await expect (dashboard.locators.onGameStart).toBeVisible ();Act
Hold
await dashboard.hold ();Assert
on game start is hidden
await expect (dashboard.locators.onGameStart).toBeHidden ();hold button is hidden
await expect (dashboard.locators.holdButton).toBeHidden ();Act
Take
await dashboard.take ();Assert
view heading “live” , “game” is visible
await expect (dashboard.viewHeading ("live" , "game" )).toBeVisible ();view heading “next” , “results” is visible
await expect (dashboard.viewHeading ("next" , "results" )).toBeVisible ();Act
Queue scene
await dashboard.queueScene ();Assert
queue item 1 is visible
await expect (dashboard.queueItem (1 )).toBeVisible ();Act
Pick scene “bracket”
await dashboard.pickScene ("bracket" );Assert
queue item 1 contains “Bracket”
await expect (dashboard.queueItem (1 )).toContainText ("Bracket" );Act
Select queue item 0
await dashboard.selectQueueItem (0 );Remove queue item 0
await dashboard.removeQueueItem (0 );Assert
queue item 1 is hidden
await expect (dashboard.queueItem (1 )).toBeHidden ();view heading “next” , “bracket” is visible
await expect (dashboard.viewHeading ("next" , "bracket" )).toBeVisible ();Act
Take
await dashboard.take ();Assert
view heading “live” , “bracket” is visible
await expect (dashboard.viewHeading ("live" , "bracket" )).toBeVisible ();Source test ("casts a match, takes scenes, edits the queue and holds next" , async ({
page,
factories,
}) => {
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
isMatchCast: false ,
});
await impersonate (page, NZAP_TEST_ID );
const dashboard = new BroadcastDashboardPage (page, pageArgs (tournament.id));
await dashboard.goto ();
await expect (dashboard.locators.noFeaturedMatch).toBeVisible ();
const match = new TournamentMatchPage (page);
await match.goto ({
tournamentId: tournament.id,
matchId: tournament.matchId,
});
await match.openTab ("admin" );
await match.setCastedBy (CAST_ACCOUNT );
await dashboard.goto ();
await expect (dashboard.locators.featuredMatch).toContainText ("Team 1" );
await expect (dashboard.locators.featuredMatch).toContainText ("Team 2" );
await expect (dashboard.viewHeading ("live" , "rosters" )).toBeVisible ();
await expect (dashboard.viewHeading ("next" , "game" )).toBeVisible ();
await expect (dashboard.locators.onGameStart).toBeVisible ();
await dashboard.hold ();
await expect (dashboard.locators.onGameStart).toBeHidden ();
await expect (dashboard.locators.holdButton).toBeHidden ();
await dashboard.take ();
await expect (dashboard.viewHeading ("live" , "game" )).toBeVisible ();
await expect (dashboard.viewHeading ("next" , "results" )).toBeVisible ();
await dashboard.queueScene ();
await expect (dashboard.queueItem (1 )).toBeVisible ();
await dashboard.pickScene ("bracket" );
await expect (dashboard.queueItem (1 )).toContainText ("Bracket" );
await dashboard.selectQueueItem (0 );
await dashboard.removeQueueItem (0 );
await expect (dashboard.queueItem (1 )).toBeHidden ();
await expect (dashboard.viewHeading ("next" , "bracket" )).toBeVisible ();
await dashboard.take ();
await expect (dashboard.viewHeading ("live" , "bracket" )).toBeVisible ();
})cuts to the game on the program when the scanner sees it start Broadcast dashboard page Arrange
Create broadcasting author N-ZAP → tournament
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});Broadcast dashboard page Act
Open the broadcast dashboard page
await dashboard.goto ();Open obs source browser base URL baseURL! tournament id tournament.id program key tournament.programKey → obs
const obs = await openObsSource ({
browser,
baseURL: baseURL!,
tournamentId: tournament.id,
programKey: tournament.programKey,
});Assert
obs.program.scene ("rosters" ) is visible
await expect (obs.program.scene ("rosters" )).toBeVisible ();post game signal type “start” inks null is 200
expect (await dashboard.postGameSignal ({ type : "start" , inks: null })).toBe (
200 ,
);view heading “live” , “game” is visible
await expect (dashboard.viewHeading ("live" , "game" )).toBeVisible ();obs.program.scene ("game" ) is visible
await expect (obs.program.scene ("game" )).toBeVisible ();Act
Close
await obs.close ();Source test ("cuts to the game on the program when the scanner sees it start" , async ({
page,
browser,
baseURL,
factories,
}) => {
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});
await impersonate (page, NZAP_TEST_ID );
const dashboard = new BroadcastDashboardPage (page, pageArgs (tournament.id));
await dashboard.goto ();
const obs = await openObsSource ({
browser,
baseURL: baseURL!,
tournamentId: tournament.id,
programKey: tournament.programKey,
});
await expect (obs.program.scene ("rosters" )).toBeVisible ();
expect (await dashboard.postGameSignal ({ type : "start" , inks: null })).toBe (
200 ,
);
await expect (dashboard.viewHeading ("live" , "game" )).toBeVisible ();
await expect (obs.program.scene ("game" )).toBeVisible ();
await obs.close ();
})shows a saved theme on the program Broadcast dashboard page Arrange
Create broadcasting author N-ZAP → tournament
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});Broadcast dashboard page Act
Open the broadcast dashboard page
await dashboard.goto ();Open obs source browser base URL baseURL! tournament id tournament.id program key tournament.programKey → obs
const obs = await openObsSource ({
browser,
baseURL: baseURL!,
tournamentId: tournament.id,
programKey: tournament.programKey,
});Assert
obs.program.locators.canvas not have CSS “outline-width” , “7px”
await expect (obs.program.locators.canvas).not.toHaveCSS (
"outline-width" ,
"7px" ,
);Act
Save theme “[data-broadcast] { outline: 7px solid rgb(1, 2, 3); }”
await dashboard.saveTheme (
"[data-broadcast] { outline: 7px solid rgb(1, 2, 3); }" ,
);Assert
obs.program.locators.canvas have CSS “outline-width” , “7px”
await expect (obs.program.locators.canvas).toHaveCSS ("outline-width" , "7px" );Act
Close
await obs.close ();Source test ("shows a saved theme on the program" , async ({
page,
browser,
baseURL,
factories,
}) => {
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});
await impersonate (page, NZAP_TEST_ID );
const dashboard = new BroadcastDashboardPage (page, pageArgs (tournament.id));
await dashboard.goto ();
const obs = await openObsSource ({
browser,
baseURL: baseURL!,
tournamentId: tournament.id,
programKey: tournament.programKey,
});
await expect (obs.program.locators.canvas).not.toHaveCSS (
"outline-width" ,
"7px" ,
);
await dashboard.saveTheme (
"[data-broadcast] { outline: 7px solid rgb(1, 2, 3); }" ,
);
await expect (obs.program.locators.canvas).toHaveCSS ("outline-width" , "7px" );
await obs.close ();
})loads a preset in the designer to edit and shows it on the program Broadcast design page Arrange
Create broadcasting author N-ZAP → tournament
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});Broadcast design page Act
Open the broadcast design page
await design.goto ();Assert
preset select contains “Default”
await expect (design.locators.presetSelect).toContainText ("Default" );Act
Pick preset “Zine”
await design.pickPreset ("Zine" );Assert
preset select contains “Zine”
await expect (design.locators.presetSelect).toContainText ("Zine" );editor has value /ZINE /
await expect (design.locators.editor).toHaveValue (/ZINE /);Act
Input value → presetCss
const presetCss = await design.locators.editor.inputValue ();Fill editor with `${presetCss}\n[data-broadcast] { outline: 7px solid rgb(1, 2, 3); }`
await design.locators.editor.fill (
`${presetCss}\n[data-broadcast] { outline: 7px solid rgb(1, 2, 3); }` ,
);Assert
preset select contains “Your own”
await expect (design.locators.presetSelect).toContainText ("Your own" );Act
Save
await design.save ();Open obs source browser base URL baseURL! tournament id tournament.id program key tournament.programKey → obs
const obs = await openObsSource ({
browser,
baseURL: baseURL!,
tournamentId: tournament.id,
programKey: tournament.programKey,
});Assert
obs.program.locators.canvas have CSS “outline-width” , “7px”
await expect (obs.program.locators.canvas).toHaveCSS ("outline-width" , "7px" );obs.program.locators.canvas have CSS “color” , “rgb(20, 20, 20)”
await expect (obs.program.locators.canvas).toHaveCSS (
"color" ,
"rgb(20, 20, 20)" ,
);Act
Pick preset “Teletext”
await design.pickPreset ("Teletext" );Click confirm preset button
await design.locators.confirmPresetButton.click ();Assert
preset select contains “Teletext”
await expect (design.locators.presetSelect).toContainText ("Teletext" );editor has value /TELETEXT /
await expect (design.locators.editor).toHaveValue (/TELETEXT /);Act
Close
await obs.close ();Source test ("loads a preset in the designer to edit and shows it on the program" , async ({
page,
browser,
baseURL,
factories,
}) => {
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});
await impersonate (page, NZAP_TEST_ID );
const design = new BroadcastDesignPage (page, pageArgs (tournament.id));
await design.goto ();
await expect (design.locators.presetSelect).toContainText ("Default" );
await design.pickPreset ("Zine" );
await expect (design.locators.presetSelect).toContainText ("Zine" );
await expect (design.locators.editor).toHaveValue (/ZINE /);
const presetCss = await design.locators.editor.inputValue ();
await design.locators.editor.fill (
`${presetCss}\n[data-broadcast] { outline: 7px solid rgb(1, 2, 3); }` ,
);
await expect (design.locators.presetSelect).toContainText ("Your own" );
await design.save ();
const obs = await openObsSource ({
browser,
baseURL: baseURL!,
tournamentId: tournament.id,
programKey: tournament.programKey,
});
await expect (obs.program.locators.canvas).toHaveCSS ("outline-width" , "7px" );
await expect (obs.program.locators.canvas).toHaveCSS (
"color" ,
"rgb(20, 20, 20)" ,
);
await design.pickPreset ("Teletext" );
await design.locators.confirmPresetButton.click ();
await expect (design.locators.presetSelect).toContainText ("Teletext" );
await expect (design.locators.editor).toHaveValue (/TELETEXT /);
await obs.close ();
})opens the channel the OBS URL shows and switches between channels Broadcast page Broadcast dashboard page Arrange
Create 1 × user → [streamer]
const [streamer] = await factories.UserFactory .createMany (1 );Create broadcasting author N-ZAP program user id streamer.id → tournament
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
programUserId: streamer.id,
});Add cast account tournament tournament id tournament.id twitch account “broadcast_other”
await factories.TournamentFactory .addCastAccount ({
tournamentId: tournament.id,
twitchAccount: OTHER_CAST_ACCOUNT ,
});Point program tournament broadcast user N-ZAP tournament id tournament.id channel platform “TWITCH” account “broadcast_other”
await factories.TournamentBroadcastFactory .pointProgram ({
userId: NZAP_TEST_ID ,
tournamentId: tournament.id,
channel: { platform: "TWITCH" , account: OTHER_CAST_ACCOUNT },
});Broadcast page Act
Open the broadcast page
await new BroadcastPage (page, tournament.id).goto ();Assert
the page URL is broadcastDashboardPage ({ tournamentId: tournament.id, slug: OTHER_CAST_ACCOUN …
await expect (page).toHaveURL (
broadcastDashboardPage ({
tournamentId: tournament.id,
slug: OTHER_CAST_ACCOUNT ,
}),
);Broadcast dashboard page Act
Click channel chip “broadcast_cast”
await dashboard.channelChip (CAST_ACCOUNT ).click ();Assert
the page URL is broadcastDashboardPage (pageArgs (tournament.id))
await expect (page).toHaveURL (
broadcastDashboardPage (pageArgs (tournament.id)),
);featured match contains “Team 1”
await expect (dashboard.locators.featuredMatch).toContainText ("Team 1" );Source test ("opens the channel the OBS URL shows and switches between channels" , async ({
page,
factories,
}) => {
const [streamer] = await factories.UserFactory .createMany (1 );
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
programUserId: streamer.id,
});
await factories.TournamentFactory .addCastAccount ({
tournamentId: tournament.id,
twitchAccount: OTHER_CAST_ACCOUNT ,
});
await factories.TournamentBroadcastFactory .pointProgram ({
userId: NZAP_TEST_ID ,
tournamentId: tournament.id,
channel: { platform: "TWITCH" , account: OTHER_CAST_ACCOUNT },
});
await impersonate (page, NZAP_TEST_ID );
await new BroadcastPage (page, tournament.id).goto ();
await expect (page).toHaveURL (
broadcastDashboardPage ({
tournamentId: tournament.id,
slug: OTHER_CAST_ACCOUNT ,
}),
);
const dashboard = new BroadcastDashboardPage (page, pageArgs (tournament.id));
await dashboard.channelChip (CAST_ACCOUNT ).click ();
await expect (page).toHaveURL (
broadcastDashboardPage (pageArgs (tournament.id)),
);
await expect (dashboard.locators.featuredMatch).toContainText ("Team 1" );
})adds the first cast channel from the broadcast page Broadcast page Arrange
Create tournament author N-ZAP start times startedTournamentTimes () → tournament
const tournament = await factories.TournamentFactory .create ({
authorId: NZAP_TEST_ID ,
startTimes: startedTournamentTimes (),
});Broadcast page Act
Open the broadcast page
await broadcast.goto ();Add channel “broadcast_cast”
await broadcast.addChannel (CAST_ACCOUNT );Assert
the page URL is broadcastDashboardPage (pageArgs (tournament.id))
await expect (page).toHaveURL (
broadcastDashboardPage (pageArgs (tournament.id)),
);heading `Broadcast · ${CAST_ACCOUNT}` is visible
await expect (
page.getByRole ("heading" , { name: `Broadcast · ${CAST_ACCOUNT}` }),
).toBeVisible ();Source test ("adds the first cast channel from the broadcast page" , async ({
page,
factories,
}) => {
const tournament = await factories.TournamentFactory .create ({
authorId: NZAP_TEST_ID ,
startTimes: startedTournamentTimes (),
});
await impersonate (page, NZAP_TEST_ID );
const broadcast = new BroadcastPage (page, tournament.id);
await broadcast.goto ();
await broadcast.addChannel (CAST_ACCOUNT );
await expect (page).toHaveURL (
broadcastDashboardPage (pageArgs (tournament.id)),
);
await expect (
page.getByRole ("heading" , { name: `Broadcast · ${CAST_ACCOUNT}` }),
).toBeVisible ();
})keeps everyone but producers out of producing Broadcast dashboard page Broadcast program page Arrange
Create 1 × user → [organizer]
const [organizer] = await factories.UserFactory .createMany (1 );Create broadcasting author id organizer.id → tournament
const tournament = await createBroadcasting (factories, {
authorId: organizer.id,
});Broadcast dashboard page Assert
response status is 404
expect (await dashboard.responseStatus ()).toBe (404 );post game signal type “start” inks null is 404
expect (await dashboard.postGameSignal ({ type : "start" , inks: null })).toBe (
404 ,
);Broadcast program page Assert
response status null is 404
expect (await program.responseStatus (null )).toBe (404 );response status tournament.programKey is 200
expect (await program.responseStatus (tournament.programKey)).toBe (200 );refused stream status “scanner” is 404
expect (await program.refusedStreamStatus ("scanner" )).toBe (404 );refused stream status “source” is 404
expect (await program.refusedStreamStatus ("source" )).toBe (404 );Source test ("keeps everyone but producers out of producing" , async ({
page,
factories,
}) => {
const [organizer] = await factories.UserFactory .createMany (1 );
const tournament = await createBroadcasting (factories, {
authorId: organizer.id,
});
await impersonate (page, NZAP_TEST_ID );
const dashboard = new BroadcastDashboardPage (page, pageArgs (tournament.id));
const program = new BroadcastProgramPage (page, pageArgs (tournament.id));
expect (await dashboard.responseStatus ()).toBe (404 );
expect (await dashboard.postGameSignal ({ type : "start" , inks: null })).toBe (
404 ,
);
expect (await program.responseStatus (null )).toBe (404 );
expect (await program.responseStatus (tournament.programKey)).toBe (200 );
expect (await program.refusedStreamStatus ("scanner" )).toBe (404 );
expect (await program.refusedStreamStatus ("source" )).toBe (404 );
})keeps one OBS URL across tournaments, showing the broadcast it was pointed at Broadcast dashboard page Arrange
Create broadcasting author N-ZAP → lastWeek
const lastWeek = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});Create broadcasting author N-ZAP → thisWeek
const thisWeek = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});Assert
thisWeek.programKey is lastWeek.programKey
expect (thisWeek.programKey).toBe (lastWeek.programKey);Broadcast dashboard page Act
Open the broadcast dashboard page
await dashboard.goto ();Save theme “[data-broadcast] { outline: 7px solid rgb(1, 2, 3); }”
await dashboard.saveTheme (
"[data-broadcast] { outline: 7px solid rgb(1, 2, 3); }" ,
);Open obs source browser base URL baseURL! tournament id thisWeek.id program key thisWeek.programKey → obs
const obs = await openObsSource ({
browser,
baseURL: baseURL!,
tournamentId: thisWeek.id,
programKey: thisWeek.programKey,
});Assert
obs.program.scene ("rosters" ) is visible
await expect (obs.program.scene ("rosters" )).toBeVisible ();obs.program.locators.canvas not have CSS “outline-width” , “7px”
await expect (obs.program.locators.canvas).not.toHaveCSS (
"outline-width" ,
"7px" ,
);Act
Point program
await dashboard.pointProgram ();Assert
program shows this is visible
await expect (dashboard.locators.programShowsThis).toBeVisible ();obs.program.locators.canvas have CSS “outline-width” , “7px”
await expect (obs.program.locators.canvas).toHaveCSS ("outline-width" , "7px" );Act
Close
await obs.close ();Source test ("keeps one OBS URL across tournaments, showing the broadcast it was pointed at" , async ({
page,
browser,
baseURL,
factories,
}) => {
const lastWeek = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});
const thisWeek = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});
expect (thisWeek.programKey).toBe (lastWeek.programKey);
await impersonate (page, NZAP_TEST_ID );
const dashboard = new BroadcastDashboardPage (page, pageArgs (lastWeek.id));
await dashboard.goto ();
await dashboard.saveTheme (
"[data-broadcast] { outline: 7px solid rgb(1, 2, 3); }" ,
);
const obs = await openObsSource ({
browser,
baseURL: baseURL!,
tournamentId: thisWeek.id,
programKey: thisWeek.programKey,
});
await expect (obs.program.scene ("rosters" )).toBeVisible ();
await expect (obs.program.locators.canvas).not.toHaveCSS (
"outline-width" ,
"7px" ,
);
await dashboard.pointProgram ();
await expect (dashboard.locators.programShowsThis).toBeVisible ();
await expect (obs.program.locators.canvas).toHaveCSS ("outline-width" , "7px" );
await obs.close ();
})runs the broadcast from a Stream Deck Broadcast dashboard page Arrange
Create broadcasting author N-ZAP → tournament
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});Act
Add init script installFakeStreamDeck
await page.addInitScript (installFakeStreamDeck);Broadcast dashboard page Act
Open the broadcast dashboard page
await dashboard.goto ();Assert
view heading “next” , “game” is visible
await expect (dashboard.viewHeading ("next" , "game" )).toBeVisible ();() => page.evaluate (() => window.fakeStreamDeck.drawnKeyCount ()) is 15
await expect
.poll (() => page.evaluate (() => window.fakeStreamDeck.drawnKeyCount ()))
.toBe (STREAM_DECK_KEY_COUNT );Act
Evaluate (key) => window.fakeStreamDeck.press (key), STREAM_DECK_KEYS .casters
await page.evaluate (
(key) => window.fakeStreamDeck.press (key),
STREAM_DECK_KEYS .casters,
);Assert
view heading “next” , “casters” is visible
await expect (dashboard.viewHeading ("next" , "casters" )).toBeVisible ();Act
Evaluate (key) => window.fakeStreamDeck.press (key), STREAM_DECK_KEYS .take
await page.evaluate (
(key) => window.fakeStreamDeck.press (key),
STREAM_DECK_KEYS .take,
);Assert
view heading “live” , “casters” is visible
await expect (dashboard.viewHeading ("live" , "casters" )).toBeVisible ();Act
Evaluate (key) => window.fakeStreamDeck.press (key), STREAM_DECK_KEYS .queueItem
await page.evaluate (
(key) => window.fakeStreamDeck.press (key),
STREAM_DECK_KEYS .queueItem,
);Assert
queue item 1 is visible
await expect (dashboard.queueItem (1 )).toBeVisible ();Act
Evaluate (key) => window.fakeStreamDeck.press (key), STREAM_DECK_KEYS .bracket
await page.evaluate (
(key) => window.fakeStreamDeck.press (key),
STREAM_DECK_KEYS .bracket,
);Assert
queue item 1 contains “Bracket”
await expect (dashboard.queueItem (1 )).toContainText ("Bracket" );Source test ("runs the broadcast from a Stream Deck" , async ({ page, factories }) => {
const tournament = await createBroadcasting (factories, {
authorId: NZAP_TEST_ID ,
});
await impersonate (page, NZAP_TEST_ID );
await page.addInitScript (installFakeStreamDeck);
const dashboard = new BroadcastDashboardPage (page, pageArgs (tournament.id));
await dashboard.goto ();
await expect (dashboard.viewHeading ("next" , "game" )).toBeVisible ();
await expect
.poll (() => page.evaluate (() => window.fakeStreamDeck.drawnKeyCount ()))
.toBe (STREAM_DECK_KEY_COUNT );
await page.evaluate (
(key) => window.fakeStreamDeck.press (key),
STREAM_DECK_KEYS .casters,
);
await expect (dashboard.viewHeading ("next" , "casters" )).toBeVisible ();
await page.evaluate (
(key) => window.fakeStreamDeck.press (key),
STREAM_DECK_KEYS .take,
);
await expect (dashboard.viewHeading ("live" , "casters" )).toBeVisible ();
await page.evaluate (
(key) => window.fakeStreamDeck.press (key),
STREAM_DECK_KEYS .queueItem,
);
await expect (dashboard.queueItem (1 )).toBeVisible ();
await page.evaluate (
(key) => window.fakeStreamDeck.press (key),
STREAM_DECK_KEYS .bracket,
);
await expect (dashboard.queueItem (1 )).toContainText ("Bracket" );
})createBroadcastinge2e/broadcast.spec.ts:346
async function createBroadcasting (
factories: Factories ,
{
authorId,
isMatchCast,
programUserId,
}: { authorId: number ; isMatchCast?: boolean ; programUserId?: number },
) {
const players = await factories.UserFactory .createMany (
TEAM_COUNT * ROSTER_SIZE ,
);
return factories.TournamentFactory .createBroadcasting (
{ authorId, startTimes: startedTournamentTimes () },
// … BroadcastDashboardPage.gotoe2e/pages/broadcast/broadcast-dashboard-page.ts:65
No JSDoc
async goto () {
await navigate ({
page: this .page,
url: broadcastDashboardPage (this .pageArgs),
});
}BroadcastDashboardPage.locators.noFeaturedMatche2e/pages/broadcast/broadcast-dashboard-page.ts:51
No JSDoc
page.getByText ("No match is cast on this channel." ) TournamentMatchPage.gotoe2e/pages/tournament/tournament-match-page.ts:108
No JSDoc
async goto ({
tournamentId,
matchId,
}: {
tournamentId: number ;
matchId: number ;
}) {
await navigate ({
page: this .page,
url: tournamentMatchPage ({ tournamentId, matchId }),
});
}TournamentMatchPage.openTabe2e/pages/tournament/tournament-match-page.ts:121
No JSDoc
async openTab (tab: Tab ) {
// with more members than the minimum, the action tab is hidden until each
// team's active roster is locked in via the rosters tab
if (tab === "action" ) {
await this .ensureActiveRostersSet ();
}
await this .page.getByRole ("tab" , { name: TAB_LABELS [tab] }).click ();
}TournamentMatchPage.setCastedBye2e/pages/tournament/tournament-match-page.ts:299
setCastedBy (twitchAccount: string ) {
return waitForPOSTResponse (this .page, async () => {
await this .page.locator (`label[for$="-TWITCH:${twitchAccount}"]` ).click ();
});
}BroadcastDashboardPage.locators.featuredMatche2e/pages/broadcast/broadcast-dashboard-page.ts:52
No JSDoc
page.getByRole ("link" , { name: /\d–\d/ }) BroadcastDashboardPage.viewHeadinge2e/pages/broadcast/broadcast-dashboard-page.ts:89
viewHeading (view: BroadcastView , scene: CastScene ) {
return this .page.getByRole ("heading" , {
level: 2 ,
name: `${VIEW_LABELS[view]} · ${SCENE_LABELS[scene]}` ,
exact: true ,
});
}BroadcastDashboardPage.locators.onGameStarte2e/pages/broadcast/broadcast-dashboard-page.ts:55
No JSDoc
page.getByText ("On game start" , { exact: true }) BroadcastDashboardPage.holde2e/pages/broadcast/broadcast-dashboard-page.ts:108
hold () {
return submit (this .page, "broadcast-hold-button" );
}BroadcastDashboardPage.locators.holdButtone2e/pages/broadcast/broadcast-dashboard-page.ts:54
No JSDoc
page.getByTestId ("broadcast-hold-button" ) BroadcastDashboardPage.takee2e/pages/broadcast/broadcast-dashboard-page.ts:103
take () {
return submit (this .page, "broadcast-take-button" );
}BroadcastDashboardPage.queueScenee2e/pages/broadcast/broadcast-dashboard-page.ts:113
queueScene () {
return waitForPOSTResponse (this .page, () =>
this .page.getByTestId ("broadcast-queue-add" ).click (),
);
}BroadcastDashboardPage.queueIteme2e/pages/broadcast/broadcast-dashboard-page.ts:98
queueItem (idx: number ) {
return this .page.getByTestId (`broadcast-queue-item-${idx}` );
}BroadcastDashboardPage.pickScenee2e/pages/broadcast/broadcast-dashboard-page.ts:125
pickScene (scene: CastScene ) {
return submit (this .page, `broadcast-scene-${scene}` );
}BroadcastDashboardPage.selectQueueIteme2e/pages/broadcast/broadcast-dashboard-page.ts:120
selectQueueItem (idx: number ) {
return this .queueItem (idx).click ();
}BroadcastDashboardPage.removeQueueIteme2e/pages/broadcast/broadcast-dashboard-page.ts:130
removeQueueItem (idx: number ) {
return submit (this .page, `broadcast-queue-remove-${idx}` );
}BroadcastDashboardPagee2e/pages/broadcast/broadcast-dashboard-page.ts:42
TournamentMatchPagee2e/pages/tournament/tournament-match-page.ts:28
openObsSourcee2e/broadcast.spec.ts:374
async function openObsSource ({
browser,
baseURL,
tournamentId,
programKey,
}: {
browser: Browser ;
baseURL: string ;
tournamentId: number ;
programKey: string ;
}) {
const context = await browser.newContext ({
baseURL,
viewport: { width: 1920 , height: 1080 },
// … BroadcastDashboardPage.postGameSignale2e/pages/broadcast/broadcast-dashboard-page.ts:154
async postGameSignal (signal: v.InferInput <typeof broadcastGameSignalSchema>) {
const response = await this .page.request.post (
broadcastGameUrl (this .pageArgs),
{ data: signal },
);
return response.status ();
}BroadcastDashboardPage.saveThemee2e/pages/broadcast/broadcast-dashboard-page.ts:135
async saveTheme (css: string ) {
await this .locators.themeTab.click ();
await this .locators.cssInput.fill (css);
await submit (
this .page,
this .page
.getByRole ("tabpanel" , { name: "Theme" })
.getByTestId ("submit-button" ),
);
}BroadcastDesignPage.gotoe2e/pages/broadcast/broadcast-design-page.ts:27
No JSDoc
async goto () {
await navigate ({
page: this .page,
url: broadcastDesignPage (this .pageArgs),
});
}BroadcastDesignPage.locators.presetSelecte2e/pages/broadcast/broadcast-design-page.ts:20
No JSDoc
page.getByLabel ("Preset" , { exact: true }) BroadcastDesignPage.pickPresete2e/pages/broadcast/broadcast-design-page.ts:35
async pickPreset (name: string ) {
await this .locators.presetSelect.click ();
await this .page.getByRole ("option" , { name, exact: true }).click ();
}BroadcastDesignPage.locators.editore2e/pages/broadcast/broadcast-design-page.ts:21
No JSDoc
page.getByTestId ("broadcast-design-editor" ) BroadcastDesignPage.savee2e/pages/broadcast/broadcast-design-page.ts:40
No JSDoc
async save () {
await submit (this .page, this .locators.saveButton);
}BroadcastDesignPage.locators.confirmPresetButtone2e/pages/broadcast/broadcast-design-page.ts:22
No JSDoc
page.getByTestId ("broadcast-design-preset-confirm" ) BroadcastDesignPagee2e/pages/broadcast/broadcast-design-page.ts:11
BroadcastPage.gotoe2e/pages/broadcast/broadcast-page.ts:19
No JSDoc
async goto () {
await navigate ({
page: this .page,
url: tournamentBroadcastsPage (this .tournamentId),
});
}BroadcastDashboardPage.channelChipe2e/pages/broadcast/broadcast-dashboard-page.ts:82
channelChip (name: string ) {
return this .page
.getByRole ("radiogroup" , { name: "Channel" })
.getByText (name, { exact: true });
}BroadcastPagee2e/pages/broadcast/broadcast-page.ts:6
BroadcastPage.addChannele2e/pages/broadcast/broadcast-page.ts:27
async addChannel (account: string ) {
await this .locators.accountInput.fill (account);
await submit (this .page, "add-cast-channel-button" );
}BroadcastDashboardPage.responseStatuse2e/pages/broadcast/broadcast-dashboard-page.ts:73
async responseStatus () {
const response = await this .page.request.get (
broadcastDashboardPage (this .pageArgs),
);
return response.status ();
}BroadcastProgramPage.responseStatuse2e/pages/broadcast/broadcast-program-page.ts:44
async responseStatus (programKey: string | null ) {
const response = await this .page.request.get (
programKey
? broadcastProgramPage (programKey)
: broadcastOverlayPage (this .pageArgs),
);
return response.status ();
}BroadcastProgramPage.refusedStreamStatuse2e/pages/broadcast/broadcast-program-page.ts:58
async refusedStreamStatus (role: BroadcastStreamRole ) {
const response = await this .page.request.get (
broadcastStreamUrl ({ ...this .pageArgs, role }),
);
return response.status ();
}BroadcastProgramPagee2e/pages/broadcast/broadcast-program-page.ts:20
BroadcastDashboardPage.pointPrograme2e/pages/broadcast/broadcast-dashboard-page.ts:147
async pointProgram () {
await this .locators.setupTab.click ();
await this .page.getByTestId ("broadcast-point-program-button" ).click ();
await submit (this .page, "confirm-button" );
}BroadcastDashboardPage.locators.programShowsThise2e/pages/broadcast/broadcast-dashboard-page.ts:58
No JSDoc
page.getByText (
"Your browser source URL shows this broadcast" ,
)