From a5a90ec6169e07957127357855e5cc19e9dff425 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Sat, 25 Dec 2021 23:10:03 +0200 Subject: [PATCH] Fix Cypress tests --- .../tournament/ActionSectionBeforeStartContent.tsx | 2 +- app/components/tournament/ActionSectionWrapper.tsx | 8 +++++++- app/routes/to/$organization.$tournament/manage-roster.tsx | 2 +- cypress/integration/tournament.spec.ts | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/components/tournament/ActionSectionBeforeStartContent.tsx b/app/components/tournament/ActionSectionBeforeStartContent.tsx index 00b96228a..27a2b3cac 100644 --- a/app/components/tournament/ActionSectionBeforeStartContent.tsx +++ b/app/components/tournament/ActionSectionBeforeStartContent.tsx @@ -57,7 +57,7 @@ export function ActionSectionBeforeStartContent({ if (!checkInHasStarted && !teamHasEnoughMembers) { return ( - + You need at least 4 players in your roster to play ); diff --git a/app/components/tournament/ActionSectionWrapper.tsx b/app/components/tournament/ActionSectionWrapper.tsx index bfb1a0f22..1608685e0 100644 --- a/app/components/tournament/ActionSectionWrapper.tsx +++ b/app/components/tournament/ActionSectionWrapper.tsx @@ -3,16 +3,22 @@ import { MyCSSProperties } from "~/utils"; export function ActionSectionWrapper({ children, icon, + ...rest }: { children: React.ReactNode; icon: "warning" | "info" | "success" | "error"; + "data-cy"?: string; }) { // todo: flex-dir: column on mobile const style: MyCSSProperties = { "--action-section-icon-color": `var(--theme-${icon})`, }; return ( -
+
{children}
); diff --git a/app/routes/to/$organization.$tournament/manage-roster.tsx b/app/routes/to/$organization.$tournament/manage-roster.tsx index 75aed19b7..67ccbac88 100644 --- a/app/routes/to/$organization.$tournament/manage-roster.tsx +++ b/app/routes/to/$organization.$tournament/manage-roster.tsx @@ -140,7 +140,7 @@ export default function ManageRosterPage() { return (
{ownTeam.members.length >= TOURNAMENT_TEAM_ROSTER_MAX_SIZE && ( - + Your team is full - more players can't be added )} diff --git a/cypress/integration/tournament.spec.ts b/cypress/integration/tournament.spec.ts index 812e418c3..cc9ee2975 100644 --- a/cypress/integration/tournament.spec.ts +++ b/cypress/integration/tournament.spec.ts @@ -27,7 +27,7 @@ describe("Before tournament starts", () => { cy.getCy("log-in-to-join-button"); cy.getCy("map-pool-nav-link").click(); - cy.contains("24 maps"); + cy.contains("26 maps"); cy.get('[alt="Moray Towers"]').should( "have.class", "map-pool__stage-image-disabled"