- Notifications
You must be signed in to change notification settings - Fork926
feat: add comprehensive Jest unit tests for CreateWorkspacePageExperimental and DynamicParameter#18592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
…mental and DynamicParameter- Add comprehensive test suite for CreateWorkspacePageExperimental.tsx covering: * WebSocket integration and dynamic parameter handling * All parameter types (string, number, boolean, list) * External authentication flows * Auto-creation mode functionality * Form submission and error handling * URL parameter pre-filling * Template presets * Navigation and routing- Add comprehensive test suite for DynamicParameter.tsx covering: * All form input types (input, textarea, select, radio, checkbox, switch, slider, tags, multiselect) * Parameter validation and error states * Preset and autofill behavior * Accessibility features * Debounced input handling * Edge cases and error conditions- Implement mock WebSocket with realistic behavior simulation- Create detailed parameter mocks for all supported types- Follow existing codebase patterns for API mocking- Include comprehensive user interaction testing- Cover async operations and error scenariosThese tests provide thorough coverage for regression testing and future developmentof the experimental workspace creation functionality.
I have read the CLA Document and I hereby sign the CLA Blink Assistant seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, pleaseadd the email address used for this commit to your account. |
I have read the CLA Document and I hereby sign the CLA |
recheck |
- Remove unused imports (fireEvent, DynamicParametersRequest)- Replace forEach with for...of loops for better performance- Fix TypeScript any type usage- Apply biome formatting fixesCo-authored-by: jaaydenh <1858163+jaaydenh@users.noreply.github.com>
recheck |
Add Comprehensive Jest Unit Tests for CreateWorkspacePageExperimental and DynamicParameter
🎯Overview
This PR adds comprehensive Jest unit tests for the experimental workspace creation functionality, specifically targeting
CreateWorkspacePageExperimental.tsx
andDynamicParameter.tsx
components.🧪Test Coverage
CreateWorkspacePageExperimental.test.tsx
DynamicParameter.test.tsx
🔧Technical Implementation
Mock WebSocket Implementation
API Mocking Strategy
jest.spyOn()
consistent with existing codebase patternsUser Interaction Testing
@testing-library/user-event
waitFor()
usage📊Test Statistics
🚀Benefits
🔍Testing Approach
📝Notes
✅Checklist