Skip to content

test(playground): fix TipTap regression test build on mr-template-editor#886

Open
Rishabh060105 wants to merge 1 commit intoaccordproject:mr-template-editorfrom
Rishabh060105:Rishabh060105/pr878-netlify-build-fix-mr-template-editor
Open

test(playground): fix TipTap regression test build on mr-template-editor#886
Rishabh060105 wants to merge 1 commit intoaccordproject:mr-template-editorfrom
Rishabh060105:Rishabh060105/pr878-netlify-build-fix-mr-template-editor

Conversation

@Rishabh060105
Copy link
Copy Markdown

@Rishabh060105 Rishabh060105 commented Apr 25, 2026

Closes N/A

Restores the Netlify/build pipeline on mr-template-editor after the new TipTap regression test introduced a TypeScript build failure.

This PR addresses a follow-up issue from PR #878 where src/tests/components/TiptapTemplateEditor.test.tsx stored a plain object in modelManager. That worked in the mocked Vitest path, but failed tsc because the Zustand store expects a real ModelManager instance. As a result, npm run build failed and the Netlify deploy checks could not complete successfully.

Changes

  • Updated src/tests/components/TiptapTemplateEditor.test.tsx to use a real ModelManager instance instead of a plain { id: string } object.
  • Kept the fix scoped to the regression test only, without changing TiptapTemplateEditor, store behavior, or any user-facing runtime flow.
  • Re-ran local verification with:
    • npm run build
    • npx vitest run src/tests/components/TiptapTemplateEditor.test.tsx
    • npx vitest run src/tests/store/setData.test.tsx
    • npm run test:unit

Flags

  • This PR intentionally keeps the fix scoped to the present mr-template-editor build regression rather than broadening into runtime/editor changes from PR feat(templateMark): add rich text editor #878.
  • Backup-branch differences in vite.config.ts and the rebuild/model-loading path were reviewed, but no broader rollback was needed once the TypeScript test failure was fixed.
  • No screenshots or video are included because this is a build/test fix rather than a visual UI change.

Screenshots or Video

N/A - this is a build/test fix. The behavior is covered by build and unit test verification rather than a visual UI change.

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to mr-template-editor from fork:branchname

Signed-off-by: Rishabh Jain <rishabhj2005@email.com>
@Rishabh060105 Rishabh060105 requested a review from a team as a code owner April 25, 2026 22:19
@Rishabh060105
Copy link
Copy Markdown
Author

Hi @mttrbrts I opened this follow-up to restore the Netlify/build checks on mr-template-editor.

Changes in this PR:

  • Updated src/tests/components/TiptapTemplateEditor.test.tsx so the regression test uses a real ModelManager instance instead of a plain object.
  • Kept the fix scoped to the test only; there are no runtime changes to the editor or store.
  • Re-validated locally with:
    • npm run build
    • npx vitest run src/tests/components/TiptapTemplateEditor.test.tsx
    • npx vitest run src/tests/store/setData.test.tsx
    • npm run test:unit

What I found on the base branch:

  • The Netlify failures were caused by the production build path failing in src/tests/components/TiptapTemplateEditor.test.tsx.
  • The test stored a plain object in modelManager, but tsc expects a real ModelManager, so npm run build failed before deploy could complete.

So this PR is intended as a narrow build-fix follow-up on top of mr-template-editor.

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.

1 participant