packages/daisyui/TEST_PLAN.md
This document outlines the test strategy for the DaisyUI theme for react-jsonschema-form. The testing approach follows existing patterns in the RJSF ecosystem while adding specific tests for DaisyUI components.
The test environment includes:
These tests use the shared RJSF snapshot testing infrastructure:
Form.test.tsx - Tests the overall form renderingArray.test.tsx - Tests array field renderingObject.test.tsx - Tests object field renderingUnit tests for DaisyUI-specific components:
DaisyUIFrameProvider.test.tsx - Tests iframe theme injectionToggleWidget.test.tsx - Tests the DaisyUI toggle componentRatingWidget.test.tsx - Tests the DaisyUI rating componentArrayFieldItemTemplate.test.tsx - Tests card-based UI for array itemsTest helpers located in test/helpers:
createMocks.ts - Creates mock props for testing form componentsTests can be run using the following npm scripts:
# Run all tests
npm test
# Update snapshots
npm run test:update
# Watch mode for development
npm run test:watch
Functional Testing
UI Testing
Accessibility Testing
Theme Management
Tests are executed as part of the CI/CD pipeline to ensure code quality before merging to main.