mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-29 14:50:13 -05:00
Fix Cypress tests
This commit is contained in:
@@ -57,7 +57,7 @@ export function ActionSectionBeforeStartContent({
|
||||
|
||||
if (!checkInHasStarted && !teamHasEnoughMembers) {
|
||||
return (
|
||||
<ActionSectionWrapper icon="warning">
|
||||
<ActionSectionWrapper icon="warning" data-cy="team-size-alert">
|
||||
<AlertIcon /> You need at least 4 players in your roster to play
|
||||
</ActionSectionWrapper>
|
||||
);
|
||||
|
||||
@@ -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 (
|
||||
<section className="tournament__action-section" style={style}>
|
||||
<section
|
||||
className="tournament__action-section"
|
||||
style={style}
|
||||
data-cy={rest["data-cy"]}
|
||||
>
|
||||
<div className="tournament__action-section__content">{children}</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
@@ -140,7 +140,7 @@ export default function ManageRosterPage() {
|
||||
return (
|
||||
<div className="tournament__manage-roster">
|
||||
{ownTeam.members.length >= TOURNAMENT_TEAM_ROSTER_MAX_SIZE && (
|
||||
<Alert type="info" data-cy="team-size-alert">
|
||||
<Alert type="info">
|
||||
Your team is full - more players can't be added
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user