Skip to content

fix(form-elements): add element internals mock stencil unit test#642

Open
QuintonJason wants to merge 1 commit intomainfrom
fix/test-timeouts
Open

fix(form-elements): add element internals mock stencil unit test#642
QuintonJason wants to merge 1 commit intomainfrom
fix/test-timeouts

Conversation

@QuintonJason
Copy link
Contributor

Description

Summary

  • Add a lightweight ElementInternals mock to Stencil unit tests for form-associated components (input/textarea/select/checkbox/switch/combobox).
  • Prevents CI failures where Jest treats the setFormValue access warning as a test error.

Motivation and Context

CI was failing on unit tests due to ElementInternals.setFormValue being unimplemented in Stencil’s mock DOM. Mocking attachInternals in unit tests avoids console errors while keeping production code unchanged.

Dependencies

  • None

Fixes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • unit tests
  • e2e tests
  • accessibility tests
  • tested manually
  • other:

Test Configuration:

  • Pine versions:
  • OS: darwin 25.1.0
  • Browsers:
  • Screen readers:
  • Misc: Suggested local repro: cd libs/core && CI=1 npm test -- --ci

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Design has QA'ed and approved this PR

@QuintonJason QuintonJason marked this pull request as ready for review January 22, 2026 21:45
@netlify
Copy link

netlify bot commented Jan 22, 2026

Deploy Preview for pine-design-system ready!

Name Link
🔨 Latest commit 601d99a
🔍 Latest deploy log https://app.netlify.com/projects/pine-design-system/deploys/69729a758425b50008f88516
😎 Deploy Preview https://deploy-preview-642--pine-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added bug Something isn't working package: core Changes have been made to the Core package labels Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working package: core Changes have been made to the Core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant