Skip to content

test(drawnix): add shared testing board fixture - #468

Merged
pubuzhixing8 merged 2 commits into
developfrom
nightt5879/issue-453-testing-fixture
Sep 7, 2026
Merged

test(drawnix): add shared testing board fixture#468
pubuzhixing8 merged 2 commits into
developfrom
nightt5879/issue-453-testing-fixture

Conversation

@nightt5879

@nightt5879 nightt5879 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary

  • add an internal setupDrawnixTestingBoard() wrapper around Plait's setupTestingBoard()
  • initialize a complete typed Drawnix appState, with optional pointer and creation-mode overrides
  • migrate the freehand middle-button and tool-state synchronization specs to real Plait board/plugin contracts and createBoardEventObserver()
  • remove broad Plait module mocks and partial board casts from the migrated tests

The helper remains under packages/drawnix/testing/ and is not exported from the published Drawnix package.

Related Issue

Closes #453

Upstream prerequisite: worktile/plait#1163 is merged, but createBoardEventObserver() has not yet been published in an npm release of @plait/core. This PR therefore remains a draft until Drawnix can update to that release.

Validation

  • Applicable checks pass: lint, format check, tests, and build
  • Relevant E2E and manual tests are complete or not applicable

Evidence, screenshots, or compatibility notes:

  • Node.js 20.20.2 from .nvmrc
  • npm run lint passes
  • npm run test -- --run passes for all four workspace projects when using the local sibling Plait develop build; Drawnix: 9 files, 26 tests
  • npm run build passes for all four workspace projects
  • targeted oxfmt --check passes for all four changed files
  • on this Windows checkout, repository-wide npm run format:check reports 127 untouched files; the pull request CI formatting step passes, and no unrelated formatting was applied
  • Cloudflare Pages passes
  • the current clean-install CI failure is the documented release blocker: npm @plait/core@0.93.4 does not yet provide createBoardEventObserver()
  • E2E and screenshots are not applicable because this changes test infrastructure and tests only

AI Assistance

Did you use AI tools to generate or substantially modify code, tests, or documentation in this pull request?

  • No
  • Yes

If yes:

  • Tool/model: Codex / GPT-5

  • AI-assisted work: Implemented the Drawnix testing wrapper, migrated the two plugin specs, and ran the local validation commands.

  • My review and validation: I reviewed and understood all four changed files before opening this pull request. The checks and results are recorded above.

  • I reviewed and understand the AI-assisted changes and can explain and maintain them

Checklist

  • The title and description are in English, and the change is focused
  • I reviewed and understand every submitted change
  • Tests, documentation, and translations were updated when needed

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploying drawnix with  Cloudflare Pages  Cloudflare Pages

Latest commit: a220563
Status: ✅  Deploy successful!
Preview URL: https://523e852a.drawnix.pages.dev
Branch Preview URL: https://nightt5879-issue-453-testing.drawnix.pages.dev

View logs

@nightt5879

Copy link
Copy Markdown
Member Author

@pubuzhixing8 The current CI failure is caused by the Plait dependency version: \createBoardEventObserver()\ was merged in worktile/plait#1163, but it is not available in the published @plait/core@0.93.4\ yet. This PR passes locally against the Plait \develop\ build. Could you please publish/update Plait, or let me know which version Drawnix should target? Once that version is available, I can update the Drawnix dependencies and rerun CI.

@pubuzhixing8

Copy link
Copy Markdown
Contributor

@nightt5879 0.94.0 is live now!

@nightt5879
nightt5879 marked this pull request as ready for review September 7, 2026 06:45
@pubuzhixing8
pubuzhixing8 merged commit b138ff8 into develop Sep 7, 2026
2 checks passed
@pubuzhixing8
pubuzhixing8 deleted the nightt5879/issue-453-testing-fixture branch September 7, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design a shared testing fixture for Drawnix plugins

2 participants