test: add Cypress specs for T1–T4 from IMPROVEMENTS.md#210
Merged
Conversation
Closes the four missing-test gaps identified in IMPROVEMENTS.md: - Reactions.cy.js: react/undoReact flow with intercept-based timing - MaxVotes.cy.js: server-side max_votes cap via PATCH + vote assertion - NotFound.cy.js: /not-found redirect for unknown board IDs - DragObscuredCard.cy.js: drag-and-drop in obscured-cards rendering path Adds data-name="react-drawer-button" to Card.svelte and data-name="emoji-button"/data-emoji attrs to ReactDrawer.svelte to support stable test selectors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
setObscureCards called cy.visit(boardUrl) before the cy.url().then() assignment had executed — boardUrl was still undefined at call time. Inline the obscure-cards toggle directly in before() instead, since we're already on the board page and no re-visit is needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…re hook
cy.session validation was failing because the participant session was
being created for the first time inside beforeEach. Following the
ObscureCards.cy.js pattern: warm up cy.login("participant") at the
end of before() so the session exists before beforeEach validates it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ticipant Participant session setup fails when called at the end of the same before() that runs all the owner board operations. Match the pattern from ObscureCards.cy.js: nest the participant tests in a child context with its own before() so the session is established after the outer before() has fully completed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ested before
ObscureCards.cy.js works because setObscureCards() calls cy.login("owner")
immediately before cy.login("participant") in the same before() block.
Mirror that pattern here — the owner login is needed to put the session
manager in the right state before the participant session is created.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two-user session setup was too fragile to be worth maintaining. Drag coverage is already provided by DragCard.cy.js. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes three missing-test gaps identified in IMPROVEMENTS.md §"Missing Test Coverage":
Reactions.cy.js— react/undoReact flow: open emoji drawer, pick 👍, assert badge appears, pick again to undo, assert badge gone. Usescy.intercepton PUT/DELETE/reactto synchronize with Firestore updates.NotFound.cy.js— board-not-found redirect: navigates to a nonexistent board ID, asserts URL becomes/not-foundand[data-name=error-alert]is visible.DragObscuredCard.cy.js— drag in obscured-cards mode: enablesopen_permission+ obscure cards as owner, then as participant verifiesobscured-placeholderis present and the card can be dragged to a second rank.Two source changes add stable test selectors:
Card.svelte:data-name="react-drawer-button"on the popover trigger divReactDrawer.svelte:data-name="emoji-button"+data-emoji={emoji}on each emoji buttonTest plan
npx cypress run --spec cypress/e2e/Reactions.cy.js— add and remove a 👍 reactionnpx cypress run --spec cypress/e2e/NotFound.cy.js— unknown board ID → /not-found pagenpx cypress run --spec cypress/e2e/DragObscuredCard.cy.js— drag obscured card to second ranknpx cypress runpasses without regressions🤖 Generated with Claude Code