feat(overlay): practice ranked on laps in a row shows only result, gap and best lap (1.89.6)
This commit is contained in:
1 parent
119619d6ff
commit
56be3d5918
9 files changed
+54
-15
No files matched your search
@@ -8,6 +8,12 @@ The application version is maintained in `package.json` and displayed in the adm
|
|||||||
|
|
||||||
No changes recorded yet.
|
No changes recorded yet.
|
||||||
|
|
||||||
|
## 1.89.6
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Overlay leaderboard: an Open Practice ranked on N laps in a row or X minutes now shows only position, driver, result, gap and best lap. The laps, ahead gap and own delta are hidden there; the next-lap bar stays.
|
||||||
|
|
||||||
## 1.89.5
|
## 1.89.5
|
||||||
|
|
||||||
- Fix: after `npm restart` the page reloads itself, and on the Overlay menu page that turned it into a full-screen overlay window without the menu. The menu page is now `?view=overlays`; only a link with `overlayMode` (the stand-alone window and OBS links) opens full screen, so an old `?view=overlay` tab also comes back with the menu.
|
- Fix: after `npm restart` the page reloads itself, and on the Overlay menu page that turned it into a full-screen overlay window without the menu. The menu page is now `?view=overlays`; only a link with `overlayMode` (the stand-alone window and OBS links) opens full screen, so an old `?view=overlay` tab also comes back with the menu.
|
||||||
|
|||||||
@@ -280,6 +280,7 @@ Settings → Audio:
|
|||||||
The **Overlay** menu has leaderboard, speaker, results, TV and team modes, plus an OBS mode with layout (leaderboard, TV graphics, grid, lower third), theme (panel, transparent, chroma), rows and columns:
|
The **Overlay** menu has leaderboard, speaker, results, TV and team modes, plus an OBS mode with layout (leaderboard, TV graphics, grid, lower third), theme (panel, transparent, chroma), rows and columns:
|
||||||
- Columns: laps, **last lap**, result, best, gap, and **places since the start** (▲/▼ in heats and finals).
|
- Columns: laps, **last lap**, result, best, gap, and **places since the start** (▲/▼ in heats and finals).
|
||||||
- **Last lap** changes at every passing. In Open Practice, where the result is just the best lap, the leaderboard shows the last lap instead of the result.
|
- **Last lap** changes at every passing. In Open Practice, where the result is just the best lap, the leaderboard shows the last lap instead of the result.
|
||||||
|
- An Open Practice ranked on **N laps in a row** or **X minutes** shows only what the rule ranks on: position, driver, result (for example "3 laps 55.123"), gap and best lap (the next-lap bar stays).
|
||||||
- **TV graphics:** a title plate top left (event and heat) and a timing tower top right with the clock on top and real columns: place / **start position** (e.g. "2 / 3"), driver, laps, time, best and gap, in large bold type with podium colours for the top three. No backdrop of its own, so the camera image shows through. The start position can be turned off and is not shown in practice.
|
- **TV graphics:** a title plate top left (event and heat) and a timing tower top right with the clock on top and real columns: place / **start position** (e.g. "2 / 3"), driver, laps, time, best and gap, in large bold type with podium colours for the top three. No backdrop of its own, so the camera image shows through. The start position can be turned off and is not shown in practice.
|
||||||
- **Live marks** in the leaderboard and the TV tower: a driver's row flashes briefly on a new time, a fuel pump badge with a ticking clock shows while the car is in the pits (then the stop time for 5 s), and a new split shows for 4 s with ± against the previous one. They run on the overlay computer's clock, and a freshly opened overlay never flashes every row.
|
- **Live marks** in the leaderboard and the TV tower: a driver's row flashes briefly on a new time, a fuel pump badge with a ticking clock shows while the car is in the pits (then the stop time for 5 s), and a new split shows for 4 s with ± against the previous one. They run on the overlay computer's clock, and a freshly opened overlay never flashes every row.
|
||||||
- The TV title plate has the RaceCore look: the club logo or a red RC mark, the event in small capitals and the heat in Orbitron.
|
- The TV title plate has the RaceCore look: the club logo or a red RC mark, the event in small capitals and the heat in Orbitron.
|
||||||
|
|||||||
@@ -293,6 +293,7 @@ Inställningar → Ljud:
|
|||||||
Menyn **Overlay** har lägena leaderboard, speaker, resultat, TV och lag, plus ett OBS-läge med layout (leaderboard, TV-grafik, grid, lower third), tema (panel, transparent, chroma), rader och kolumner:
|
Menyn **Overlay** har lägena leaderboard, speaker, resultat, TV och lag, plus ett OBS-läge med layout (leaderboard, TV-grafik, grid, lower third), tema (panel, transparent, chroma), rader och kolumner:
|
||||||
- Kolumner: varv, **senaste varv**, resultat, bästa, gap och **placering sedan start** (▲/▼ i heat och finaler).
|
- Kolumner: varv, **senaste varv**, resultat, bästa, gap och **placering sedan start** (▲/▼ i heat och finaler).
|
||||||
- **Senaste varv** byts vid varje passering. I Open Practice, där resultatet bara är bästa varvet, visar leaderboarden senaste varv i stället för resultat.
|
- **Senaste varv** byts vid varje passering. I Open Practice, där resultatet bara är bästa varvet, visar leaderboarden senaste varv i stället för resultat.
|
||||||
|
- En Open Practice som rankas på **N varv i rad** eller **X minuter** visar bara det regeln rankar på: placering, förare, resultat (t.ex. "3 varv 55,123"), gap och bästa varv (stapeln för nästa varv finns kvar).
|
||||||
- **TV-grafik:** rubrikskylt uppe till vänster (event och heat) och en topplista uppe till höger med klockan överst och raka kolumner: placering / **startplats** (t.ex. "2 / 3"), förare, varv, tid, bästa och gap, i stor fet text och medaljfärger för topp 3. Ingen egen bakgrund, så kamerabilden syns igenom. Startplatsen kan stängas av och visas inte i träning.
|
- **TV-grafik:** rubrikskylt uppe till vänster (event och heat) och en topplista uppe till höger med klockan överst och raka kolumner: placering / **startplats** (t.ex. "2 / 3"), förare, varv, tid, bästa och gap, i stor fet text och medaljfärger för topp 3. Ingen egen bakgrund, så kamerabilden syns igenom. Startplatsen kan stängas av och visas inte i träning.
|
||||||
- **Livemarkeringar** i leaderboard och TV-topplistan: förarens rad blinkar kort vid en ny tid, en bränslepump med tickande klocka visas medan bilen är i depå (sedan stopptiden i 5 s), och en ny mellantid visas i 4 s med ± mot förra. De går på overlay-datorns klocka, och en nyöppnad overlay blinkar aldrig alla rader.
|
- **Livemarkeringar** i leaderboard och TV-topplistan: förarens rad blinkar kort vid en ny tid, en bränslepump med tickande klocka visas medan bilen är i depå (sedan stopptiden i 5 s), och en ny mellantid visas i 4 s med ± mot förra. De går på overlay-datorns klocka, och en nyöppnad overlay blinkar aldrig alla rader.
|
||||||
- TV-rubrikskylten har RaceCore-utseende: klubbens logga eller ett rött RC-märke, eventet i små versaler och heatet i Orbitron.
|
- TV-rubrikskylten har RaceCore-utseende: klubbens logga eller ett rött RC-märke, eventet i små versaler och heatet i Orbitron.
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "rc-racecore",
|
"name": "rc-racecore",
|
||||||
"version": "1.89.5",
|
"version": "1.89.6",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "rc-racecore",
|
"name": "rc-racecore",
|
||||||
"version": "1.89.5",
|
"version": "1.89.6",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"better-sqlite3": "^12.11.1",
|
"better-sqlite3": "^12.11.1",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rc-racecore",
|
"name": "rc-racecore",
|
||||||
"version": "1.89.5",
|
"version": "1.89.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "RC RaceCore live timing and race control with AMMC ingest and SQLite persistence",
|
"description": "RC RaceCore live timing and race control with AMMC ingest and SQLite persistence",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
import { isOpenPracticeSession } from "./overlays.js";
|
import { isOpenPracticeSession, isPracticeRankedSession } from "./overlays.js";
|
||||||
|
|
||||||
let activeGuideTab = "start";
|
let activeGuideTab = "start";
|
||||||
const GUIDE_TAB_IDS = ["start", "create", "run", "series", "training", "videos", "install"];
|
const GUIDE_TAB_IDS = ["start", "create", "run", "series", "training", "videos", "install"];
|
||||||
@@ -329,7 +329,7 @@ export function renderOverlayPageView(deps) {
|
|||||||
<div class="overlay-fastest-meta">${t("table.laps")}: ${topRow?.laps || 0} | ${t("timing.total_passings")}: ${getVisiblePassings(result).length || 0}</div>
|
<div class="overlay-fastest-meta">${t("table.laps")}: ${topRow?.laps || 0} | ${t("timing.total_passings")}: ${getVisiblePassings(result).length || 0}</div>
|
||||||
</section>
|
</section>
|
||||||
<div class="overlay-leaderboard-card overlay-leaderboard-card-tv overlay-leaderboard-card-dense">
|
<div class="overlay-leaderboard-card overlay-leaderboard-card-tv overlay-leaderboard-card-dense">
|
||||||
${renderOverlayLeaderboard(leaderboard, { t, escapeHtml, formatTeamActiveMemberLabel, formatLap, formatPredictedLapDelta }, { lastLap: isOpenPracticeSession(active) })}
|
${renderOverlayLeaderboard(leaderboard, { t, escapeHtml, formatTeamActiveMemberLabel, formatLap, formatPredictedLapDelta }, { lastLap: isOpenPracticeSession(active), practiceRank: isPracticeRankedSession(active) })}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -345,7 +345,7 @@ export function renderOverlayPageView(deps) {
|
|||||||
<div class="overlay-fastest-meta">${t("table.laps")}: ${topRow?.laps || 0} | ${t("timing.total_passings")}: ${result?.passings.length || 0}</div>
|
<div class="overlay-fastest-meta">${t("table.laps")}: ${topRow?.laps || 0} | ${t("timing.total_passings")}: ${result?.passings.length || 0}</div>
|
||||||
</section>
|
</section>
|
||||||
<div class="overlay-leaderboard-card overlay-leaderboard-card-dense">
|
<div class="overlay-leaderboard-card overlay-leaderboard-card-dense">
|
||||||
${renderOverlayLeaderboard(leaderboard, { t, escapeHtml, formatTeamActiveMemberLabel, formatLap, formatPredictedLapDelta }, { lastLap: isOpenPracticeSession(active) })}
|
${renderOverlayLeaderboard(leaderboard, { t, escapeHtml, formatTeamActiveMemberLabel, formatLap, formatPredictedLapDelta }, { lastLap: isOpenPracticeSession(active), practiceRank: isPracticeRankedSession(active) })}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<aside class="overlay-side">
|
<aside class="overlay-side">
|
||||||
|
|||||||
+19
-9
@@ -59,13 +59,15 @@ export function renderOverlaySidePanel(panel, { t, escapeHtml }) {
|
|||||||
|
|
||||||
// driverLinks: a click on a driver opens their training stats (RaceCore's own overlay only - never
|
// driverLinks: a click on a driver opens their training stats (RaceCore's own overlay only - never
|
||||||
// the public overlay, see openDriverTrainingStats in app.js).
|
// the public overlay, see openDriverTrainingStats in app.js).
|
||||||
export function renderOverlayLeaderboard(rows, { t, escapeHtml, formatTeamActiveMemberLabel, formatLap, formatPredictedLapDelta }, { sortable = true, driverLinks = false, lastLap = false } = {}) {
|
export function renderOverlayLeaderboard(rows, { t, escapeHtml, formatTeamActiveMemberLabel, formatLap, formatPredictedLapDelta }, { sortable = true, driverLinks = false, lastLap = false, practiceRank = false } = {}) {
|
||||||
if (!rows.length) {
|
if (!rows.length) {
|
||||||
return `<p>${t("timing.no_laps")}</p>`;
|
return `<p>${t("timing.no_laps")}</p>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sortAttrs = sortable
|
const sortAttrs = sortable
|
||||||
? ` data-sort-id="overlay-leaderboard" data-sort-text-columns="1" data-sort-labels="${sortValuesAttribute([t("table.pos"), t("table.driver"), t("table.laps"), t(lastLap ? "table.last_lap" : "table.result"), t("table.gap"), t("table.ahead_gap"), t("table.own_delta"), t("table.best_lap")])}"`
|
? ` data-sort-id="overlay-leaderboard" data-sort-text-columns="1" data-sort-labels="${sortValuesAttribute(practiceRank
|
||||||
|
? [t("table.pos"), t("table.driver"), t("table.result"), t("table.gap"), t("table.best_lap")]
|
||||||
|
: [t("table.pos"), t("table.driver"), t("table.laps"), t(lastLap ? "table.last_lap" : "table.result"), t("table.gap"), t("table.ahead_gap"), t("table.own_delta"), t("table.best_lap")])}"`
|
||||||
: "";
|
: "";
|
||||||
// More than 12 cars (a busy Open Practice): compact rows so all of them fit on a TV that
|
// More than 12 cars (a busy Open Practice): compact rows so all of them fit on a TV that
|
||||||
// can't scroll - no per-cell labels (the header names the columns), sub-line or prediction bar.
|
// can't scroll - no per-cell labels (the header names the columns), sub-line or prediction bar.
|
||||||
@@ -73,11 +75,13 @@ export function renderOverlayLeaderboard(rows, { t, escapeHtml, formatTeamActive
|
|||||||
const liveMarks = overlayLiveMarks.observe(rows);
|
const liveMarks = overlayLiveMarks.observe(rows);
|
||||||
const markLabels = { pit: t("table.pit"), split: t("table.split") };
|
const markLabels = { pit: t("table.pit"), split: t("table.split") };
|
||||||
return `
|
return `
|
||||||
<div class="overlay-race-list ${compact ? "overlay-race-list-compact" : ""}"${sortAttrs}>
|
<div class="overlay-race-list ${compact ? "overlay-race-list-compact" : ""} ${practiceRank ? "overlay-race-list-ranked" : ""}"${sortAttrs}>
|
||||||
${rows
|
${rows
|
||||||
.map((row, idx) => {
|
.map((row, idx) => {
|
||||||
const posClass = idx === 0 ? "pos-1" : idx === 1 ? "pos-2" : idx === 2 ? "pos-3" : "";
|
const posClass = idx === 0 ? "pos-1" : idx === 1 ? "pos-2" : idx === 2 ? "pos-3" : "";
|
||||||
const rowSortAttr = sortable ? ` data-sort-values="${sortValuesAttribute([idx + 1, row.displayName || row.driverName, row.laps ?? 0, lastLap ? row.lastLapMs || null : row.resultDisplay, row.gapDisplay || row.gapAhead || null, row.gapAhead || null, row.lapDelta || null, row.bestLapMs || null])}"` : "";
|
const rowSortAttr = sortable ? ` data-sort-values="${sortValuesAttribute(practiceRank
|
||||||
|
? [idx + 1, row.displayName || row.driverName, row.practiceMetric?.comparableMs ?? null, row.gapDisplay || null, row.bestLapMs || null]
|
||||||
|
: [idx + 1, row.displayName || row.driverName, row.laps ?? 0, lastLap ? row.lastLapMs || null : row.resultDisplay, row.gapDisplay || row.gapAhead || null, row.gapAhead || null, row.lapDelta || null, row.bestLapMs || null])}"` : "";
|
||||||
const linkAttrs = driverLinks && row.driverId && !row.teamId ? ` data-training-driver="${escapeHtml(row.driverId)}" title="${escapeHtml(t("overlay.open_training_stats"))}"` : "";
|
const linkAttrs = driverLinks && row.driverId && !row.teamId ? ` data-training-driver="${escapeHtml(row.driverId)}" title="${escapeHtml(t("overlay.open_training_stats"))}"` : "";
|
||||||
const mark = liveMarks.get(String(row.key ?? ""));
|
const mark = liveMarks.get(String(row.key ?? ""));
|
||||||
const flash = passingFlashAttrs(mark);
|
const flash = passingFlashAttrs(mark);
|
||||||
@@ -101,10 +105,10 @@ export function renderOverlayLeaderboard(rows, { t, escapeHtml, formatTeamActive
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overlay-race-metric">
|
${practiceRank ? "" : `<div class="overlay-race-metric">
|
||||||
<label>${t("table.laps")}</label>
|
<label>${t("table.laps")}</label>
|
||||||
<strong>${row.laps ?? 0}</strong>
|
<strong>${row.laps ?? 0}</strong>
|
||||||
</div>
|
</div>`}
|
||||||
<div class="overlay-race-metric">
|
<div class="overlay-race-metric">
|
||||||
<label>${t(lastLap ? "table.last_lap" : "table.result")}</label>
|
<label>${t(lastLap ? "table.last_lap" : "table.result")}</label>
|
||||||
<strong>${lastLap ? (row.lastLapMs > 0 ? escapeHtml(formatLap(row.lastLapMs)) : "-") : escapeHtml(row.resultDisplay)}</strong>
|
<strong>${lastLap ? (row.lastLapMs > 0 ? escapeHtml(formatLap(row.lastLapMs)) : "-") : escapeHtml(row.resultDisplay)}</strong>
|
||||||
@@ -113,14 +117,14 @@ export function renderOverlayLeaderboard(rows, { t, escapeHtml, formatTeamActive
|
|||||||
<label>${t("table.gap")}</label>
|
<label>${t("table.gap")}</label>
|
||||||
<strong>${escapeHtml(row.gapDisplay || row.gapAhead || "-")}</strong>
|
<strong>${escapeHtml(row.gapDisplay || row.gapAhead || "-")}</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="overlay-race-metric">
|
${practiceRank ? "" : `<div class="overlay-race-metric">
|
||||||
<label>${t("table.ahead_gap")}</label>
|
<label>${t("table.ahead_gap")}</label>
|
||||||
<strong>${escapeHtml(row.gapAhead || "-")}</strong>
|
<strong>${escapeHtml(row.gapAhead || "-")}</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="overlay-race-metric">
|
<div class="overlay-race-metric">
|
||||||
<label>${t("table.own_delta")}</label>
|
<label>${t("table.own_delta")}</label>
|
||||||
<strong>${escapeHtml(row.lapDelta || "-")}</strong>
|
<strong>${escapeHtml(row.lapDelta || "-")}</strong>
|
||||||
</div>
|
</div>`}
|
||||||
<div class="overlay-race-best">
|
<div class="overlay-race-best">
|
||||||
<label>${t("table.best_lap")}</label>
|
<label>${t("table.best_lap")}</label>
|
||||||
<strong>${formatLap(row.bestLapMs)}</strong>
|
<strong>${formatLap(row.bestLapMs)}</strong>
|
||||||
@@ -273,6 +277,12 @@ function renderObsBroadcast({ active, compactRows, startOrder, showStartGrid, fa
|
|||||||
|
|
||||||
// In practice the ranking value *is* the best lap, so "result" and "best" would print the
|
// In practice the ranking value *is* the best lap, so "result" and "best" would print the
|
||||||
// same time twice - show it once.
|
// same time twice - show it once.
|
||||||
|
// An Open Practice ranked on N laps in a row or X minutes: the overlay shows only what the
|
||||||
|
// rule ranks on (the result, the gap and the best lap), not the race columns.
|
||||||
|
export function isPracticeRankedSession(session) {
|
||||||
|
return ["open_practice", "free_practice"].includes(String(session?.type || ""))
|
||||||
|
&& ["consecutive", "window"].includes(String(session?.practiceRanking || ""));
|
||||||
|
}
|
||||||
// An Open Practice ranked on the best lap: its result only repeats the best-lap column, and the
|
// An Open Practice ranked on the best lap: its result only repeats the best-lap column, and the
|
||||||
// last lap is what changes at each passing. Ranked on N laps in a row or X minutes, the result
|
// last lap is what changes at each passing. Ranked on N laps in a row or X minutes, the result
|
||||||
// ("2 laps 35.104") says something of its own and stays.
|
// ("2 laps 35.104") says something of its own and stays.
|
||||||
@@ -354,7 +364,7 @@ export function renderObsOverlay(active, leaderboard, result, sessionTiming, bra
|
|||||||
<h3>${showStartGrid ? t("events.start_grid") : t("overlay.leaderboard_live")}</h3>
|
<h3>${showStartGrid ? t("events.start_grid") : t("overlay.leaderboard_live")}</h3>
|
||||||
<span class="pill">${t("overlay.mode_obs")}</span>
|
<span class="pill">${t("overlay.mode_obs")}</span>
|
||||||
</div>
|
</div>
|
||||||
${showStartGrid ? renderPositionGrid(active) : renderOverlayLeaderboard(compactRows, deps, { sortable: false, lastLap: isOpenPracticeSession(active) })}
|
${showStartGrid ? renderPositionGrid(active) : renderOverlayLeaderboard(compactRows, deps, { sortable: false, lastLap: isOpenPracticeSession(active), practiceRank: isPracticeRankedSession(active) })}
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -3567,6 +3567,11 @@ select:focus {
|
|||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Practice ranked on N laps in a row / X minutes: position, driver, result, gap, best lap. */
|
||||||
|
.overlay-race-list-ranked {
|
||||||
|
--overlay-columns: 30px minmax(148px, 1.42fr) repeat(3, minmax(80px, 0.5fr));
|
||||||
|
}
|
||||||
|
|
||||||
.overlay-race-row {
|
.overlay-race-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
min-width: 610px;
|
min-width: 610px;
|
||||||
|
|||||||
@@ -51,3 +51,19 @@ test("an Open Practice ranked on laps in a row or minutes keeps its result", asy
|
|||||||
assert.equal(isOpenPracticeSession({ type: "free_practice", practiceRanking: "window" }), false);
|
assert.equal(isOpenPracticeSession({ type: "free_practice", practiceRanking: "window" }), false);
|
||||||
assert.equal(isOpenPracticeSession({ type: "qualification" }), false);
|
assert.equal(isOpenPracticeSession({ type: "qualification" }), false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("practice ranked on 3 laps in a row: only result, gap and best lap as times (position, driver and next-lap bar stay)", async () => {
|
||||||
|
const { isPracticeRankedSession } = await import("../src/overlays.js");
|
||||||
|
assert.equal(isPracticeRankedSession({ type: "open_practice", practiceRanking: "consecutive" }), true);
|
||||||
|
assert.equal(isPracticeRankedSession({ type: "open_practice" }), false);
|
||||||
|
assert.equal(isPracticeRankedSession({ type: "final", practiceRanking: "consecutive" }), false);
|
||||||
|
const row = { key: "a", driverId: "a", displayName: "Anna", laps: 12, resultDisplay: "3 varv 55.123", gapDisplay: "+0.747s", gapAhead: "+0.2", lapDelta: "-0.1", bestLapMs: 18201, lastLapMs: 18777, predictedRemainingMs: 9000 };
|
||||||
|
const html = renderOverlayLeaderboard([row], deps, { practiceRank: true });
|
||||||
|
assert.match(html, /overlay-race-list-ranked/);
|
||||||
|
assert.match(html, /pos-pill pos-1">1</);
|
||||||
|
assert.match(html, /<label>table\.result<\/label>\s*<strong>3 varv 55\.123<\/strong>/);
|
||||||
|
assert.match(html, /<label>table\.gap<\/label>\s*<strong>\+0\.747s<\/strong>/);
|
||||||
|
assert.match(html, /<label>table\.best_lap<\/label>\s*<strong>18201<\/strong>/);
|
||||||
|
assert.match(html, /class="overlay-prediction"/, "the next-lap bar stays");
|
||||||
|
for (const gone of ["table.laps", "table.ahead_gap", "table.own_delta"]) assert.doesNotMatch(html, new RegExp(gone.replace(".", "\\.")), gone);
|
||||||
|
});
|
||||||
Reference in new issue
Block a user