Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

feat: integrate testing framework and add test cases#2

Merged
caio-pizzol merged 6 commits intomainfrom
caio/sd-510-add-unit-tests-for-esign-component
Oct 8, 2025
Merged

feat: integrate testing framework and add test cases#2
caio-pizzol merged 6 commits intomainfrom
caio/sd-510-add-unit-tests-for-esign-component

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

  • 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.
@linear
Copy link
Copy Markdown

linear Bot commented Oct 8, 2025

@caio-pizzol caio-pizzol requested a review from Copilot October 8, 2025 17:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/index.tsx
Comment on lines +339 to +340
addAuditEvent({ type: "submit" });

Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'submit' audit event is being added twice. Line 339 should be removed as the result is captured on line 341.

Suggested change
addAuditEvent({ type: "submit" });

Copilot uses AI. Check for mistakes.
@caio-pizzol caio-pizzol merged commit e92c73e into main Oct 8, 2025
1 check passed
@caio-pizzol caio-pizzol deleted the caio/sd-510-add-unit-tests-for-esign-component branch October 8, 2025 17:13
@superdoc-bot
Copy link
Copy Markdown

superdoc-bot Bot commented Oct 8, 2025

🎉 This PR is included in version 1.2.0-next.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

superdoc-bot Bot pushed a commit that referenced this pull request Oct 8, 2025
# [1.3.0](v1.2.0...v1.3.0) (2025-10-08)

### Features

* enhance document download and UI components in app ([#1](#1)) ([cab8848](cab8848))
* integrate testing framework and add test cases ([#2](#2)) ([e92c73e](e92c73e))
@superdoc-bot
Copy link
Copy Markdown

superdoc-bot Bot commented Oct 8, 2025

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants