Skip to content

Comments

Add comprehensive test suite with unit and integration tests#24

Open
Copilot wants to merge 4 commits intorefactor-to-pydanticfrom
copilot/write-test-suite-for-addon
Open

Add comprehensive test suite with unit and integration tests#24
Copilot wants to merge 4 commits intorefactor-to-pydanticfrom
copilot/write-test-suite-for-addon

Conversation

Copy link

Copilot AI commented Feb 11, 2026

Adds comprehensive test coverage for previously untested modules including handlers, API services, utilities, and integration workflows.

Test Files Added (84+ test methods)

Unit Tests

  • test_handlers.py - Schema versioning event handler
  • test_api_services.py - REST API services (/@json-schema, /@ui-schema, expandable elements)
  • test_common_utils.py - Base path calculation, dependency validation invariants
  • test_ct_option_list.py - OptionList content type with external API fetching, authentication, error handling
  • test_viewlets.py - Developer viewlet rendering, schema retrieval, version management
  • test_setuphandlers.py - Installation/uninstallation hooks
  • test_view_utils.py - View registration and utilities
  • test_schema_generation.py - JSON schema generation for all field types (text, email, URL, date, number), constraints, required fields

Integration Tests

  • test_integration_forms.py - Complete form rendering with all field types, dependencies (OR/AND), show/hide conditions
  • test_integration_wizard.py - Multi-step wizard navigation, nested forms, schema generation

Coverage Additions

Previously untested areas now covered:

  • Event handlers for schema versioning on content modification
  • REST API endpoint responses and schema structure
  • External option list fetching with HTTP mocking
  • Dependency validation across container boundaries (Form/Complex/Array/Fieldset)
  • Schema generation edge cases (min/max constraints, format validation, nested objects)
  • Wizard step management and navigation

Documentation

  • docs/TEST_SUITE.md - Comprehensive test suite documentation
  • src/edi/jsonforms/tests/README.md - Quick reference with examples

All tests follow existing plone.app.testing patterns, use appropriate test layers (INTEGRATION_TESTING, FUNCTIONAL_TESTING), and mock external dependencies.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 11, 2026 08:45
Co-authored-by: neferin12 <33598039+neferin12@users.noreply.github.com>
Co-authored-by: neferin12 <33598039+neferin12@users.noreply.github.com>
Co-authored-by: neferin12 <33598039+neferin12@users.noreply.github.com>
Copilot AI changed the title [WIP] Add comprehensive test suite for Plone add-on Add comprehensive test suite with unit and integration tests Feb 11, 2026
Copilot AI requested a review from neferin12 February 11, 2026 08:51
@neferin12 neferin12 requested review from ninamuecke and removed request for neferin12 February 11, 2026 08:54
@ninamuecke ninamuecke marked this pull request as ready for review February 16, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants