From 00c5d04153e7aea346308a4df82e68a8faf7dc3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Garapich?= Date: Fri, 2 Aug 2024 10:23:30 +0000 Subject: [PATCH] test(e2e): fix tests --- playwright.config.ts | 8 +++--- src/queue/views/html/queue-slot.tsx | 2 +- tests/10-queue/04-everybody-leaves.spec.ts | 21 ++++++++++---- tests/10-queue/05-late-for-ready-up.spec.ts | 32 ++++++++++++++------- tests/fixtures/auth-users.ts | 1 + 5 files changed, 43 insertions(+), 21 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index d428d224..9257b547 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -13,13 +13,13 @@ export default defineConfig({ /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env['CI'], + forbidOnly: !!process.env.CI, /* Retry on CI only */ - retries: process.env['CI'] ? 2 : 0, + retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ - workers: process.env['CI'] ? 1 : '50%', + workers: process.env.CI ? 1 : '50%', /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'html', + reporter: process.env.CI ? 'github' : 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */ diff --git a/src/queue/views/html/queue-slot.tsx b/src/queue/views/html/queue-slot.tsx index 0c0e243d..fef355ad 100644 --- a/src/queue/views/html/queue-slot.tsx +++ b/src/queue/views/html/queue-slot.tsx @@ -79,7 +79,7 @@ function PlayerInfo(props: { markAsFriendButtonState: MarkAsFriendButtonState | undefined }) { let slotButton = <> - if (props.isActorsSlot) { + if (props.isActorsSlot && !props.ready) { slotButton = (