Problem/Motivation

\Drupal\Tests\standard\Functional\StandardTest::testStandard() validates all installed config for config schema compliance.

Umami should do the same.

Steps to reproduce

N/A

Proposed resolution

Copy test coverage from the Standard profile's test coverage.

Remaining tasks

  1. Copy test coverage from the Standard profile's test coverage.
  2. Fix failures caused by config schema violations in Demo Umami's config — given the problems surfaced at #3361534: KernelTestBase::$strictConfigSchema = TRUE and BrowserTestBase::$strictConfigSchema = TRUE do not actually strictly validate, we know for sure there are problems.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

Issue fork drupal-3377055

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Active » Needs review
Issue tags: +Configuration schema, +validation

I expect this to fail like so:

1) Drupal\Tests\demo_umami\Functional\DemoUmamiProfileTest::testConfig
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
-Array &0 ()
+Array &0 (
+    0 => 'The current CKEditor 5 build requires the following elements and attributes: <br><code><br> <p> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <* dir="ltr rtl" lang> <cite> <dl> <dt> <dd> <a hreflang href> <blockquote cite> <ul type> <ol type start reversed> <img src alt data-entity-type data-entity-uuid data-align data-caption width height> <drupal-media data-view-mode title data-entity-type data-entity-uuid alt data-caption data-align> <strong> <em> <li>< /code><br>The following elements are not supported: <br><code><img loading>< /code>'
+    1 => 'The current CKEditor 5 build requires the following elements and attributes: <br><code><br> <p> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <* dir="ltr rtl" lang> <cite> <dl> <dt> <dd> <a hreflang href> <blockquote cite> <ul type> <ol type start reversed> <img src alt data-entity-type data-entity-uuid data-align data-caption width height> <drupal-media data-view-mode title data-entity-type data-entity-uuid alt data-caption data-align> <strong> <em> <li>< /code><br>The following elements are missing: <br><code><ol reversed>< /code>'
+    2 => 'Configuration for the enabled plugin "<em class="placeholder">List</em>" (<em class="placeholder">ckeditor5_list</em>) is missing.'
+    3 => 'Configuration for the enabled plugin "<em class="placeholder">Media</em>" (<em class="placeholder">media_media</em>) is missing.'
+)
wim leers’s picture

Now expecting

1) Drupal\Tests\demo_umami\Functional\DemoUmamiProfileTest::testConfig
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
-Array &0 ()
+Array &0 (
+    0 => 'The current CKEditor 5 build requires the following elements and attributes: <br> <p> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <* dir="ltr rtl" lang> <cite> <dl> <dt> <dd> <a hreflang href> <blockquote cite> <ul type> <ol type start> <img src alt data-entity-type data-entity-uuid data-align data-caption width height> <drupal-media data-view-mode title data-entity-type data-entity-uuid alt data-caption data-align> <strong> <em> <li>The following elements are not supported: <img loading>'
+)

Root cause: #3247795: Add text filter plugin to support <img loading="lazy"> and remove it from editor_file_reference wanted to allow users of Basic HTML to override the loading attribute on <img>, but didn't correctly upgrade the CKEditor 5 settings to actually allow it.

wim leers’s picture

Assigned: wim leers » Unassigned

That should be green!

borisson_’s picture

Status: Needs review » Needs work

Great, let's change the drupalci.yml back to the default.

wim leers’s picture

Title: Validate config schema compliance of Demo Umami profile, just like we do for Standard » Validate config schema compliance of Demo Umami and Minimal profiles, just like we do for Standard
Status: Needs work » Needs review

Did that, and also applied it to the Minimal install profile as you requested in Slack. Note that for Minimal, I did not include the CKEditor 5 validation logic because Minimal has no configuration that enables CKEditor 5.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Great, this will hopefully make sure that every config we have in core that comes with an install profile is compliant with the schema's that underpin it. These tests will probably break when we increase the validation of the config schema's but this is a great way to keep those schema's in check.

wim leers’s picture

Exactly, that's the goal! 😊

lauriii made their first commit to this issue’s fork.

lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed 39cf4d2 and pushed to 11.x. Thanks!

  • lauriii committed 39cf4d22 on 11.x
    Issue #3377055 by Wim Leers, borisson_: Validate config schema...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.