[PR #6764] [MERGED] test(game): the initiative style browser test always reaches Ada's first turn #7319

Closed
opened 2026-10-23 04:18:36 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6764
Author: @kolacheee
Created: 9/27/2026
Status: ✅ Merged
Merged: 9/27/2026
Merged by: @kolacheee

Base: staging ← Head: fix/style-e2e-first-turn


📝 Commits (3)

  • fab39cb test(game): the initiative style browser test always reaches Ada's first turn
  • a351fbc Merge remote-tracking branch 'origin/staging' into fix/style-e2e-first-turn
  • 04c7815 Merge remote-tracking branch 'origin/staging' into fix/style-e2e-first-turn

📊 Changes

2 files changed (+11 additions, -1 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 e2e/game-combat-director.e2e.ts (+9 -1)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #6763

Why this change

The browser test for attacks made in an initiative style (added in #6741) sometimes fails, and it runs in every PR's browser checks.

  • What the test needs. It waits for Ada's menu, but the combat director always starts a fight on a random seed.
  • What goes wrong. When the Grave-rat swarm opens ahead of Ada and lands a spending gnaw, one blow can fill her whole harm track, and the party loses before her first turn.
  • Where it showed. It failed once in 13 local runs while validating #6762.

What changed

  • Ada always acts first. In the test's own copy of Gravewatch, the swarm throws no initiative dice: its initiativeModifier is 0, and the copy's pool.min is 0 so a pool may be empty. So the swarm opens at 3 and Ada at 3 or more, and a tie goes to the larger pool.
  • The test says so. It checks that Ada is first in the order the fight starts with, so it fails at once, with a clear message, if that ever stops being true.
  • CHANGELOG entry.

No product code changes.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Run by the agent on this branch's one commit on staging 72cdaeb46:

  • pnpm check exits 0.
  • The test passed eight times in a row: pnpm regression:ui e2e/game-combat-director.e2e.ts --project=desktop-chromium --workers=1 -g "made in a style".
  • Giving the swarm a 15-die pool instead makes the new check fail with "Expected: ada, Received: rats", so the check catches the order it guards.

The failure it fixes, from the failed run's page snapshot:

  • "Initiative: Grave-rat swarm 5, Ada 3."
  • The swarm's Telling blow hits, and "Ada takes 5 tearing damage, and is on 0 of 4".
  • "Defeat... Your party has fallen."

Local CodeRabbit (coderabbit review --agent --committed): one pass, 0 findings.

Nothing to verify by hand: this changes a test only.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

Only CHANGELOG.md changes; nothing under docs/.

UI evidence (if applicable)

None: a test-only change.

Summary by CodeRabbit

  • Tests
    • Updated the combat scenario to verify that Ada acts first when the Grave-rat swarm has no initiative dice. The test now checks turn order when combat begins, covering this edge case. This update changes test coverage only; it does not change player-facing gameplay.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/6764 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 9/27/2026 **Status:** ✅ Merged **Merged:** 9/27/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/style-e2e-first-turn` --- ### 📝 Commits (3) - [`fab39cb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fab39cb500a5f255b668ce63135db7cf8231ce00) test(game): the initiative style browser test always reaches Ada's first turn - [`a351fbc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a351fbc5b5e4d06588c12ff26583fcd80ff7c9a5) Merge remote-tracking branch 'origin/staging' into fix/style-e2e-first-turn - [`04c7815`](https://github.com/Pasta-Devs/Marinara-Engine/commit/04c7815d948ffba3d2a890b1036ba4eb8ca6c59c) Merge remote-tracking branch 'origin/staging' into fix/style-e2e-first-turn ### 📊 Changes **2 files changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `e2e/game-combat-director.e2e.ts` (+9 -1) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #6763 ## Why this change The browser test for attacks made in an initiative style (added in #6741) sometimes fails, and it runs in every PR's browser checks. - **What the test needs.** It waits for Ada's menu, but the combat director always starts a fight on a random seed. - **What goes wrong.** When the Grave-rat swarm opens ahead of Ada and lands a spending gnaw, one blow can fill her whole harm track, and the party loses before her first turn. - **Where it showed.** It failed once in 13 local runs while validating #6762. ## What changed - **Ada always acts first.** In the test's own copy of Gravewatch, the swarm throws no initiative dice: its `initiativeModifier` is 0, and the copy's `pool.min` is 0 so a pool may be empty. So the swarm opens at 3 and Ada at 3 or more, and a tie goes to the larger pool. - **The test says so.** It checks that Ada is first in the order the fight starts with, so it fails at once, with a clear message, if that ever stops being true. - **CHANGELOG** entry. No product code changes. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Run by the agent on this branch's one commit on staging 72cdaeb46: - `pnpm check` exits 0. - The test passed eight times in a row: `pnpm regression:ui e2e/game-combat-director.e2e.ts --project=desktop-chromium --workers=1 -g "made in a style"`. - Giving the swarm a 15-die pool instead makes the new check fail with "Expected: ada, Received: rats", so the check catches the order it guards. The failure it fixes, from the failed run's page snapshot: - "Initiative: Grave-rat swarm 5, Ada 3." - The swarm's Telling blow hits, and "Ada takes 5 tearing damage, and is on 0 of 4". - "Defeat... Your party has fallen." Local CodeRabbit (`coderabbit review --agent --committed`): one pass, 0 findings. Nothing to verify by hand: this changes a test only. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) Only `CHANGELOG.md` changes; nothing under `docs/`. ## UI evidence (if applicable) None: a test-only change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Updated the combat scenario to verify that Ada acts first when the Grave-rat swarm has no initiative dice. The test now checks turn order when combat begins, covering this edge case. This update changes test coverage only; it does not change player-facing gameplay. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:18:36 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7319
No description provided.