feat: integrate testing framework and add test cases#2
Conversation
caio-pizzol
commented
Oct 8, 2025
- Added Vitest as the testing framework and configured test scripts in package.json.
- Implemented test cases for the SuperDocESign component, covering rendering, state management, and audit trail functionality.
- Updated Vite configuration to support testing with jsdom environment.
- Enhanced GitHub workflows to include testing in PR validation and release processes.
…n component - Added Vitest as the testing framework and configured test scripts in package.json. - Implemented test cases for the SuperDocESign component, covering rendering, state management, and audit trail functionality. - Updated Vite configuration to support testing with jsdom environment. - Enhanced GitHub workflows to include testing in PR validation and release processes.
…or body and footer
…low to use pnpm exec for commitlint
There was a problem hiding this comment.
Pull Request Overview
This PR integrates Vitest as the testing framework for the SuperDocESign component and adds comprehensive test coverage. The implementation includes test configuration, mock setup, and test cases covering component rendering, state management, and audit trail functionality.
- Added Vitest testing framework with jsdom environment configuration
- Implemented comprehensive test suite for SuperDocESign component covering rendering, validation, and user interactions
- Enhanced GitHub workflows to include testing in PR validation and release processes
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Added Vitest configuration with jsdom environment and test setup |
| src/types.ts | Added SuperDocESignHandle interface for component ref methods |
| src/test/setup.ts | Created comprehensive test setup with mocks for SuperDoc and audit tracking |
| src/index.tsx | Enhanced component with test data attributes and improved ref typing |
| src/defaults/SignatureInput.tsx | Minor formatting improvement for JSX element |
| src/tests/SuperDocESign.test.tsx | Added extensive test cases for component functionality |
| package.json | Added testing dependencies and scripts |
| commitlint.config.js | Added commit linting configuration |
| .github/workflows/release-package.yml | Added test execution to release workflow |
| .github/workflows/pr-validation.yml | Added test execution to PR validation workflow |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| addAuditEvent({ type: "submit" }); | ||
|
|
There was a problem hiding this comment.
The 'submit' audit event is being added twice. Line 339 should be removed as the result is captured on line 341.
| addAuditEvent({ type: "submit" }); |
|
🎉 This PR is included in version 1.2.0-next.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |