Probably fix E2E tests
Some checks are pending
E2E Tests / e2e (push) Waiting to run
Tests and checks on push / run-checks-and-tests (push) Waiting to run
Updates translation progress / update-translation-progress-issue (push) Waiting to run

This commit is contained in:
Kalle 2025-10-25 18:04:04 +03:00
parent 510491c039
commit 9100fa3026

View File

@ -4,6 +4,7 @@ import * as TournamentRepository from "~/features/tournament/TournamentRepositor
import * as TournamentTeamRepository from "~/features/tournament/TournamentTeamRepository.server";
import * as UserRepository from "~/features/user-page/UserRepository.server";
import { cache, IN_MILLISECONDS, ttl } from "~/utils/cache.server";
import { IS_E2E_TEST_RUN } from "~/utils/e2e";
import { logger } from "~/utils/logger";
import { notFoundIfFalsy, parseParams } from "~/utils/remix.server";
import { resolveMapList } from "../core/mapList.server";
@ -37,7 +38,8 @@ export const loader = async ({ params }: LoaderFunctionArgs) => {
? await cachified({
key: `no-screen-mid-${matchId}`,
cache,
ttl: ttl(IN_MILLISECONDS.TWO_DAYS),
// avoid preferences from other test runs leaking in
ttl: IS_E2E_TEST_RUN ? -1 : ttl(IN_MILLISECONDS.TWO_DAYS),
async getFreshValue() {
return UserRepository.anyUserPrefersNoScreen(
match.players.map((p) => p.id),