Skip to content

Expand E2E card fixture with an ICE card and assert auto-rotation on board placement #408

@arasaka-net

Description

@arasaka-net

The E2E fixture in e2e/fixtures.js contains only identity, operation, and event cards. Adding an ICE card enables testing the auto-rotation behavior that fires when ICE is placed on the board — a type-specific rule with no E2E coverage today.

Context
When a card with type_code: "ice" is moved to the board area, handleCardBehavior in card.js automatically adds the rotated class to simulate the sideways orientation of installed ICE in Netrunner. This behavior is tested in unit tests via handleCardBehavior, but the unit tests mock the DOM and cannot verify that the rotation survives the full draw-from-deck → drag-to-board → ungrab pipeline in a real browser. The existing fixture has four cards (two identities, Hedge Fund, Sure Gamble), none of which are ICE. Adding a single ICE card to the fixture and writing a short assertion in the smoke test closes this gap.

Affected Files

  • e2e/fixtures.js:5 — Add an ICE card entry (e.g., Ice Wall) to the apiFixture.data array
  • e2e/smoke.test.js — Add an assertion that draws an ICE card from a deck containing ICE, moves it to the board, and verifies the rotated class is applied

Requirements

  • The apiFixture in e2e/fixtures.js includes at least one card with type_code: "ice"
  • An E2E test draws the ICE card from a deck, releases it on the board area, and asserts the card element has the rotated class
  • Existing smoke and P2P tests continue to pass without modification
  • The test passes in headless Chromium via npm run e2e

Verification

  • npm run e2e
  • grep -n 'ice' e2e/fixtures.js

Not In Scope

  • Do not test face-down visibility rules for corp cards on the board — that is a separate handleCardBehavior branch
  • Do not add agenda, hardware, resource, or program cards to the fixture
  • Do not modify handleCardBehavior logic

Evidence

  • e2e/fixtures.js:5-35 — Fixture contains four cards: corp identity (type identity), Hedge Fund (type operation), runner identity (type identity), Sure Gamble (type event) — no ICE card
  • src/scripts/card.js:290-298handleCardBehavior adds rotated class when data-type is ice and data-location is board, and removes rotated from all other card types — this branch has zero E2E coverage

Arasaka Queue Planning Division.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions