diff --git a/app/index.html b/app/index.html index 619254a..a9360d6 100644 --- a/app/index.html +++ b/app/index.html @@ -948,7 +948,7 @@

Punten toevoegen

'

' + (names.length > 1 ? "Gelijkspel: " + names.join(" & ") : names[0] + " wint") + '

' + '

' + g.won.score + ' punten ยท winscore ' + g.winScore + ' gehaald in ' + esc(g.name) + '

' + standings(g).map((s,i) => '
' + (i+1) + '' + esc(s.name) + '' + s.score + '
').join("") + - '' + + '' + '' + '', true); } @@ -1347,7 +1347,7 @@

Punten toevoegen

case "finish-confirm": { state.history.unshift({ name:g.name, date:g.date, winScore:g.winScore, standings:standings(g).map(s => ({ name:s.name, score:s.score })) }); state.games = state.games.filter(x => x.id !== g.id); - state.openGameId = null; closeAllSheets(); state.tab = "games"; state.gamesMode = "history"; render(); toast("Eindstand in historie"); break; + state.openGameId = null; closeAllSheets(); state.tab = "games"; state.gamesMode = btn.dataset.mode === "overview" ? "current" : "history"; render(); toast("Eindstand in historie"); break; } case "revanche": { state.history.unshift({ name:g.name, date:g.date, winScore:g.winScore, standings:standings(g).map(s => ({ name:s.name, score:s.score })) }); diff --git a/tests/features/winst.feature b/tests/features/winst.feature index 92db850..3ac35f1 100644 --- a/tests/features/winst.feature +++ b/tests/features/winst.feature @@ -43,6 +43,13 @@ Functionaliteit: Winnen en afronden Dan zie ik 1 items in de historie En zie ik 0 spellen in de lijst + Scenario: Na het winstmenu kom ik terug in het spellenoverzicht + Gegeven een spel met de spelers Bob en Anne en winscore 50 + Als ik het spel open + En ik "Bob" 50 punten geef + En ik de eindstand bewaar + Dan zie ik het spellenoverzicht + Scenario: Toch doorspelen zet de winscore uit Gegeven een spel met de spelers Bob en Anne en winscore 50 Als ik het spel open diff --git a/tests/steps/spellen.ts b/tests/steps/spellen.ts index f60e4b1..3aa6964 100644 --- a/tests/steps/spellen.ts +++ b/tests/steps/spellen.ts @@ -6,7 +6,7 @@ Then("zie ik {int} spellen in de lijst", async ({ page }, aantal: number) => { }); Then("zie ik het spellenoverzicht", async ({ page }) => { - await expect(page.getByTestId("nieuw-spel").or(page.getByTestId("nieuw-spel-leeg"))).toBeVisible(); + await expect(page.getByTestId("nieuw-spel").or(page.getByTestId("nieuw-spel-leeg")).first()).toBeVisible(); }); Then("zie ik de spelers {word} en {word} op het scorebord", async ({ page }, a: string, b: string) => {