Test Validation of Required Fields within Schema in Patternkit

Created on 11 June 2024, 18 days ago

Problem/Motivation

In RHDC, a migration from D7 to D9 may have introduced data into some patterns that don't match the schema. This seems to cause patternkit to omit validation checks when a required field in a schema isn't filled out.
This test is to validate that required fields within a schema are properly validated in patternkit.

Steps to reproduce

  • Add "required": ["text"] in the schema file to make that particular field mandatory/required.
  1. Enable Patternkit and Patternkit example module.
  2. Configure a node type and enable layout builder.
  3. Add a new content with layout builder enabled and fill out the required field.
  4. Go to layout builder tab.
  5. Add [Patternkit] Example block
  6. Don't give any input in the text field which is required
  7. Click on add/save block

Success Criteria

  • On save, any required fields on a pattern are filled out
  • If any data in the pattern doesn't match the schema
  • Fail validation and provide opportunity for the editor to fix
  • Display validation failure information to guide the editor
  • Don't allow submission of the form

Proposed resolution

Implemented browser tests to cover this functionality within the PatternKit module.

Remaining tasks

  • Identify crucial test scenarios that are currently not covered for this functionality
  • Develop additional tests for the identified scenarios.

API changes

N/A

Data model changes

N/A

πŸ“Œ Task
Status

Active

Version

9.1

Component

Module Core

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024