Skip to content

Commit

Permalink
test: added testid to mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dariogmori committed May 5, 2024
1 parent babd659 commit e679a7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion webapp/e2e/steps/playing_full_game_positive.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ defineFeature(feature, test => {
});

when('Clicking the button to start a new game (Kiwi Quest gamemode)', async() => {
await expect(page).toClick("button[class='chakra-button css-4ctvp9'");
await expect(page).toClick("button[data-testid='Mode-KIWI_QUEST'");
await expect(page).toClick("button[data-testid='Play']");
});

Expand Down
1 change: 1 addition & 0 deletions webapp/src/pages/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export default function Dashboard() {
{modes.length > 0 && modes.map(mode => (
<Button
key={mode.internal_representation}
data-testid={"Mode-"+mode.internal_representation}
colorScheme={"green"}
variant={selectedButton === mode.name ? "solid" : "ghost"}
textAlign="center"
Expand Down

0 comments on commit e679a7b

Please sign in to comment.