diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 12ff2b613903aeb9a028042a1643e1b12c159655..9e56648b2fc6732ffd2dd9f791cff34380019496 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,19 +1,11 @@
 ################
-# DrupalCI GitLabCI template
+# GitLabCI template for Drupal projects.
 #
-# Gitlab-ci.yml to replicate DrupalCI testing for Contrib
-#
-# With thanks to:
-#   * The GitLab Acceleration Initiative participants
-#   * DrupalSpoons
-################
-
-################
-# Guidelines
-#
-# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
-#
-# However, you can modify this template if you have additional needs for your project.
+# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification.
+# It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
+# As long as you include the project, ref and three files below, any future updates added by the Drupal Association will be used in your
+# pipelines automatically. However, you can modify this template if you have additional needs for your project.
+# The full documentation is on https://project.pages.drupalcode.org/gitlab_templates/
 ################
 
 ################
@@ -25,7 +17,6 @@
 # Includes can be overridden by re-declaring anything provided in an include, here in gitlab-ci.yml
 # https://docs.gitlab.com/ee/ci/yaml/includes.html#override-included-configuration-values
 ################
-
 include:
   ################
   # DrupalCI includes:
@@ -36,8 +27,6 @@ include:
     ref: $_GITLAB_TEMPLATES_REF
     file:
       - '/includes/include.drupalci.main.yml'
-      # EXPERIMENTAL: For Drupal 7, remove the above line and uncomment the below.
-      # - '/includes/include.drupalci.main-d7.yml'
       - '/includes/include.drupalci.variables.yml'
       - '/includes/include.drupalci.workflows.yml'
 
@@ -46,54 +35,13 @@ include:
 #
 # These are the variables provided to the Run Pipeline form that a user may want to override.
 #
-# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/includes/include.drupalci.variables.yml
+# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml
 ################
 variables:
- SKIP_CSPELL: '1'
-
-
-###################################################################################
-#
-#                                        *
-#                                       /(
-#                                      ((((,
-#                                    /(((((((
-#                                   ((((((((((*
-#                                ,(((((((((((((((
-#                              ,(((((((((((((((((((
-#                            ((((((((((((((((((((((((*
-#                         *(((((((((((((((((((((((((((((
-#                       ((((((((((((((((((((((((((((((((((*
-#                    *((((((((((((((((((  .((((((((((((((((((
-#                  ((((((((((((((((((.       /(((((((((((((((((*
-#                /(((((((((((((((((            .(((((((((((((((((,
-#             ,((((((((((((((((((                 ((((((((((((((((((
-#           .((((((((((((((((((((                   .(((((((((((((((((
-#          (((((((((((((((((((((((                     ((((((((((((((((/
-#        (((((((((((((((((((((((((((/                    ,(((((((((((((((*
-#      .((((((((((((((/  /(((((((((((((.                   ,(((((((((((((((
-#     *((((((((((((((      ,(((((((((((((/                   *((((((((((((((.
-#    ((((((((((((((,          /(((((((((((((.                  ((((((((((((((,
-#   (((((((((((((/              ,(((((((((((((*                 ,(((((((((((((,
-#  *(((((((((((((                .(((((((((((((((                ,(((((((((((((
-#  ((((((((((((/                /((((((((((((((((((.              ,((((((((((((/
-# (((((((((((((              *(((((((((((((((((((((((*             *((((((((((((
-# (((((((((((((            ,(((((((((((((..(((((((((((((           *((((((((((((
-# ((((((((((((,          /((((((((((((*      /((((((((((((/         ((((((((((((
-# (((((((((((((        /((((((((((((/          (((((((((((((*       ((((((((((((
-# (((((((((((((/     /((((((((((((               ,((((((((((((,    *((((((((((((
-#  ((((((((((((((  *(((((((((((/                   *((((((((((((.  ((((((((((((/
-#  *((((((((((((((((((((((((((,                      /(((((((((((((((((((((((((
-#   (((((((((((((((((((((((((                         ((((((((((((((((((((((((,
-#   .(((((((((((((((((((((((/                         ,(((((((((((((((((((((((
-#     ((((((((((((((((((((((/                         ,(((((((((((((((((((((/
-#      *(((((((((((((((((((((                         (((((((((((((((((((((,
-#       ,(((((((((((((((((((((,                      ((((((((((((((((((((/
-#         ,(((((((((((((((((((((*                  /((((((((((((((((((((
-#            ((((((((((((((((((((((,           ,/((((((((((((((((((((,
-#              ,(((((((((((((((((((((((((((((((((((((((((((((((((((
-#                 .(((((((((((((((((((((((((((((((((((((((((((((
-#                     .((((((((((((((((((((((((((((((((((((,.
-#                          .,(((((((((((((((((((((((((.
-#
-###################################################################################
+  SKIP_CSPELL: 1
+  OPT_IN_TEST_CURRENT: 1
+  OPT_IN_TEST_PREVIOUS_MAJOR: 1
+  OPT_IN_TEST_PREVIOUS_MINOR: 1
+  OPT_IN_TEST_NEXT_MINOR: 1
+  OPT_IN_TEST_NEXT_MAJOR: 1
+  OPT_IN_TEST_MAX_PHP: 1
diff --git a/composer.json b/composer.json
index fb34a05c85b6f599a2cca91686bd8100e5508c2a..9f2f5738b2e9eae162be2d75898b0bea6587e0c9 100644
--- a/composer.json
+++ b/composer.json
@@ -24,11 +24,8 @@
     "drupal/core": "^10 || ^11"
   },
   "require-dev": {
-    "drupal/crop": "^2.1",
-    "drupal/paragraphs": "^1.12",
-    "drupal/media_entity_instagram": "^2.1 || ^3",
-    "drupal/media_entity_pinterest": "^2.5",
-    "drupal/media_entity_slideshow": "^2.0",
-    "drupal/media_entity_twitter": "^2.4"
+    "drupal/crop": "^2.4",
+    "drupal/entity_reference_revisions": "^1.12",
+    "drupal/paragraphs": "^1.18"
   }
 }
diff --git a/modules/custom_elements_thunder/README.md b/modules/custom_elements_thunder/README.md
index 82875fa84bab9eb78d77f80fa2d619c81334f0b9..35cd3008039f7fde3f2c765d453769c8d342d8ce 100644
--- a/modules/custom_elements_thunder/README.md
+++ b/modules/custom_elements_thunder/README.md
@@ -11,6 +11,16 @@ seamless/supported upgrade path.
 
 ## Status of support
 
+No Custom Elements Displays (configuration) are not provided for the 'instagram'
+and 'pinterest' paragraphs and media types. These were simply forgotten, due
+to the fact that the latest 8.x-2.x module lacked automated tests for them.
+They are very similar to the 'twitter' paragraphs / media type:
+- the paragraph types contain a single entityreference field 'field_media';
+- the media types contain a 'field_url' field, plus 'instagram' contains two
+  extra fields 'field_author' and 'field_content' (just like twitter).
+So it would be quite simple to add them, especially since the shipped Custom
+Elements Display for the 'twitter' media type only has the URL field enabled.
+
 The video processor from version 8.x-2.x was still dependent on the
 [Video Embed field](https://www.drupal.org/project/video_embed_field) module,
 which has not been used by Thunder's video media type since version
diff --git a/modules/custom_elements_ui/js/custom_elements_ui.js b/modules/custom_elements_ui/js/custom_elements_ui.js
index 1e637e6340f17dac9bf47d10fca83d01bf5a3391..96cd7192f4b9a409ad639cb75041315d7bf0404e 100644
--- a/modules/custom_elements_ui/js/custom_elements_ui.js
+++ b/modules/custom_elements_ui/js/custom_elements_ui.js
@@ -332,7 +332,9 @@
     this.$regionSelect = $(row).find('select.field-region');
 
     // Attach change listeners to select and input elements in the row.
-    $(row).find('select').on('change', Drupal.customElementsUIOverview.onChange);
+    $(row)
+      .find('select')
+      .on('change', Drupal.customElementsUIOverview.onChange);
 
     return this;
   };
diff --git a/tests/modules/custom_elements_test_paragraphs/README.md b/tests/modules/custom_elements_test_paragraphs/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..bebacbffe7b498e1b36a640eff47aa43b38ac10e
--- /dev/null
+++ b/tests/modules/custom_elements_test_paragraphs/README.md
@@ -0,0 +1,67 @@
+This module installs configuration for various paragraph types and all
+dependent config (fields and node types), to test Custom Elements handling.
+
+It tries to track the paragraph structures as provided by the Thunder
+distribution. There is no dependency on Thuhder; the configuration objects are
+basically copies, which means they could go out of date.
+
+Various paragraph types have been removed over time:
+- video (the video processor shipped with custom_elements_thunder before v3
+         was only compatible with non-core media fields / video_embed_field
+         module, which Thunder has not supported since Drupal 9. No replacement
+         processor or configuration to test Thunder's Drupal 9+ video paragraph
+         has been provided in the custom_elements_thunder module, so far.)
+- gallery (dependent on media_entity_slideshow module)
+- twitter (dependent on media_entity_twitter module)
+
+The mentioned media_* dependent modules had no D11 compatible release at the
+time custom_eleents 3.0.1 was released, so the dependent config was removed
+from this module, and the tests commented out. When these modules get a D11
+compatible release, the configuration can be reinstated from v3.0.0 and the
+commented tests can be made to work again, so that the custom elements
+configuration objects provided in the custom_elements_thunder module can be
+tested again.
+
+Some other Thunder paragraph/media types are not tested and contain no
+configuration in the module, even though their media_entity_* modules were
+initially added as dependencies (and now removed):
+- instagram
+- pinterest
+
+### Dependency on 'media type' modules
+
+Media types and their fields (configuration objects), and consequently the
+entityreference fields in the respective paragraph types, have a config
+dependency on the modules providing a media source. E.g. the following
+config objects have a dependency on the media_entity_twitter:
+- field.field.media.twitter.field_* -> media.type.twitter
+- field.field.paragraph.twitter.field_media -> media.type.twitter
+  (also depends on paragraph.type.twitter but that has no relevant dependencies)
+- media.type.twitter -> media_entity_twitter module
+
+The custom_elements module currently does not use any code from these
+dependency modules, for actually rendering these entities. That would only
+happen through any CE field formatters / processors that contain
+- code specific to media entities (likely doing something with the media
+  source provided by these dependency modules, which is tied to media types).
+  This would then likely depend on which / how (meta)data is added to those
+  media types, by our tests.
+- custom code calling into these specific modules.
+
+The only other exposure which the custom_elements module can have to these
+media type modules, is while instantiating a media entity + its fields, before
+passing them into CE field formatters / processors. It is quite unlikely that
+these modules have any effect, unless they provide their own field type that is
+used in the media entities. (video_embed_field had its own field type, but the
+instagram/pinterest/twitter modules do not.)
+
+Therefore, unless / until we start testing against any media-specific metadata
+structures:
+- It is not very important to test all instagram/pinterest/twitter media types,
+  which have equal / similar field structures.
+- It would be possible to re-construct e.g. a fake twitter media type (with
+  some generic 'media source') to test its URL output without any dependency
+  on the specific module / its supported Drupal versions.
+- These media specific tests don't seem very important, if/when we have good
+  kernel tests that test the field types involved (like URL / entityreference
+  fields).
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.gallery.field_media_images.yml b/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.gallery.field_media_images.yml
deleted file mode 100644
index 63c5816ce920fc97d099c72e24984b28bc1a8d97..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.gallery.field_media_images.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-status: true
-dependencies:
-  config:
-    - field.storage.media.field_media_images
-    - media.type.gallery
-    - media.type.image
-id: media.gallery.field_media_images
-field_name: field_media_images
-entity_type: media
-bundle: gallery
-label: 'Media Images'
-description: ''
-required: true
-translatable: false
-default_value: {  }
-default_value_callback: ''
-settings:
-  handler: 'default:media'
-  handler_settings:
-    target_bundles:
-      image: image
-    sort:
-      field: _none
-field_type: entity_reference
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.twitter.field_author.yml b/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.twitter.field_author.yml
deleted file mode 100644
index e5594531ca4d4c8aaab8adad707c3105d3daf249..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.twitter.field_author.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-status: true
-dependencies:
-  config:
-    - field.storage.media.field_author
-    - media.type.twitter
-id: media.twitter.field_author
-field_name: field_author
-entity_type: media
-bundle: twitter
-label: Author
-description: ''
-required: false
-translatable: false
-default_value: {  }
-default_value_callback: ''
-settings: {  }
-field_type: string
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.twitter.field_content.yml b/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.twitter.field_content.yml
deleted file mode 100644
index 873c349da5b5be01451963fcb77f32c76325fbbf..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.twitter.field_content.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-status: true
-dependencies:
-  config:
-    - field.storage.media.field_content
-    - media.type.twitter
-id: media.twitter.field_content
-field_name: field_content
-entity_type: media
-bundle: twitter
-label: Content
-description: ''
-required: false
-translatable: false
-default_value: {  }
-default_value_callback: ''
-settings: {  }
-field_type: string_long
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.twitter.field_url.yml b/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.twitter.field_url.yml
deleted file mode 100644
index 6647aeffd3ff737a65db878c9c1e33fc5c4ee55f..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.media.twitter.field_url.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-status: true
-dependencies:
-  config:
-    - field.storage.media.field_url
-    - media.type.twitter
-  module:
-    - link
-id: media.twitter.field_url
-field_name: field_url
-entity_type: media
-bundle: twitter
-label: 'Twitter url'
-description: ''
-required: true
-translatable: false
-default_value: {  }
-default_value_callback: ''
-settings:
-  link_type: 16
-  title: 0
-field_type: link
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.paragraph.gallery.field_media.yml b/tests/modules/custom_elements_test_paragraphs/config/install/field.field.paragraph.gallery.field_media.yml
deleted file mode 100644
index d65597349492f4f6b48b2d3c82aa99da5fabbf12..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.paragraph.gallery.field_media.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-langcode: en
-status: true
-dependencies:
-  config:
-    - field.storage.paragraph.field_media
-    - media.type.gallery
-    - paragraphs.paragraphs_type.gallery
-id: paragraph.gallery.field_media
-field_name: field_media
-entity_type: paragraph
-bundle: gallery
-label: Media
-description: ''
-required: true
-translatable: true
-default_value: {  }
-default_value_callback: ''
-settings:
-  handler: 'default:media'
-  handler_settings:
-    target_bundles:
-      gallery: gallery
-    sort:
-      field: _none
-    auto_create: false
-    auto_create_bundle: ''
-field_type: entity_reference
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.paragraph.twitter.field_media.yml b/tests/modules/custom_elements_test_paragraphs/config/install/field.field.paragraph.twitter.field_media.yml
deleted file mode 100644
index 709f3717ca4b827bc7c68d1ba02cb9dddd8692c1..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/field.field.paragraph.twitter.field_media.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-langcode: en
-status: true
-dependencies:
-  config:
-    - field.storage.paragraph.field_media
-    - media.type.twitter
-    - paragraphs.paragraphs_type.twitter
-id: paragraph.twitter.field_media
-field_name: field_media
-entity_type: paragraph
-bundle: twitter
-label: Media
-description: ''
-required: true
-translatable: true
-default_value: {  }
-default_value_callback: ''
-settings:
-  handler: 'default:media'
-  handler_settings:
-    target_bundles:
-      twitter: twitter
-    sort:
-      field: _none
-    auto_create: false
-    auto_create_bundle: ''
-field_type: entity_reference
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_author.yml b/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_author.yml
deleted file mode 100644
index e98d677f6b65ba8f7264bcf02fb6a97847d20601..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_author.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-status: true
-dependencies:
-  module:
-    - media
-id: media.field_author
-field_name: field_author
-entity_type: media
-type: string
-settings:
-  max_length: 255
-  is_ascii: false
-  case_sensitive: false
-module: core
-locked: false
-cardinality: 1
-translatable: true
-indexes: {  }
-persist_with_no_fields: false
-custom_storage: false
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_content.yml b/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_content.yml
deleted file mode 100644
index bfade85fa31026819ee1987b03631aa4c5360f52..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_content.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-status: true
-dependencies:
-  module:
-    - media
-id: media.field_content
-field_name: field_content
-entity_type: media
-type: string_long
-settings:
-  case_sensitive: false
-module: core
-locked: false
-cardinality: 1
-translatable: true
-indexes: {  }
-persist_with_no_fields: false
-custom_storage: false
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_media_images.yml b/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_media_images.yml
deleted file mode 100644
index 307dd3477f0923ac05d5699ebee245a2a07c64dc..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_media_images.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-status: true
-dependencies:
-  module:
-    - media
-id: media.field_media_images
-field_name: field_media_images
-entity_type: media
-type: entity_reference
-settings:
-  target_type: media
-module: core
-locked: false
-cardinality: -1
-translatable: true
-indexes: {  }
-persist_with_no_fields: false
-custom_storage: false
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_url.yml b/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_url.yml
deleted file mode 100644
index c34a58943b66465def665a06bf0bf8ae2bc6c558..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.media.field_url.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-status: true
-dependencies:
-  module:
-    - link
-    - media
-id: media.field_url
-field_name: field_url
-entity_type: media
-type: link
-settings: {  }
-module: link
-locked: false
-cardinality: 1
-translatable: true
-indexes: {  }
-persist_with_no_fields: false
-custom_storage: false
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.paragraph.field_media.yml b/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.paragraph.field_media.yml
deleted file mode 100644
index cb9d0ecc5091f03e2f6bd34650874d5ba299105d..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/field.storage.paragraph.field_media.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-langcode: en
-status: true
-dependencies:
-  module:
-    - media
-    - paragraphs
-id: paragraph.field_media
-field_name: field_media
-entity_type: paragraph
-type: entity_reference
-settings:
-  target_type: media
-module: core
-locked: false
-cardinality: 1
-translatable: true
-indexes: {  }
-persist_with_no_fields: false
-custom_storage: false
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/media.type.gallery.yml b/tests/modules/custom_elements_test_paragraphs/config/install/media.type.gallery.yml
deleted file mode 100644
index 9ecceccdc5c02cd3b4efc64af07aa33eab319420..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/media.type.gallery.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-status: true
-dependencies:
-  module:
-    - media_entity_slideshow
-id: gallery
-label: Gallery
-description: ''
-source: slideshow
-queue_thumbnail_downloads: false
-new_revision: false
-source_configuration:
-  source_field: field_media_images
-field_map: {  }
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/media.type.twitter.yml b/tests/modules/custom_elements_test_paragraphs/config/install/media.type.twitter.yml
deleted file mode 100644
index 5705ab191a83e73e6ca53c6f475c8a0e662d958f..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/media.type.twitter.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-status: true
-dependencies:
-  module:
-    - crop
-    - media_entity_twitter
-third_party_settings:
-  crop:
-    image_field: null
-id: twitter
-label: Twitter
-description: ''
-source: twitter
-queue_thumbnail_downloads: false
-new_revision: false
-source_configuration:
-  use_twitter_api: false
-  generate_thumbnails: false
-  source_field: field_url
-  consumer_key: ''
-  consumer_secret: ''
-  oauth_access_token: ''
-  oauth_access_token_secret: ''
-field_map:
-  user: field_author
-  content: field_content
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/paragraphs.paragraphs_type.gallery.yml b/tests/modules/custom_elements_test_paragraphs/config/install/paragraphs.paragraphs_type.gallery.yml
deleted file mode 100644
index 2beeb2f95a278f0f877ec2946eaa8c862149698d..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/paragraphs.paragraphs_type.gallery.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-langcode: en
-status: true
-dependencies: {  }
-id: gallery
-label: Gallery
-icon_uuid: null
-description: ''
-behavior_plugins: {  }
diff --git a/tests/modules/custom_elements_test_paragraphs/config/install/paragraphs.paragraphs_type.twitter.yml b/tests/modules/custom_elements_test_paragraphs/config/install/paragraphs.paragraphs_type.twitter.yml
deleted file mode 100644
index ec048ea382f616a8d311597620c8450c1541b422..0000000000000000000000000000000000000000
--- a/tests/modules/custom_elements_test_paragraphs/config/install/paragraphs.paragraphs_type.twitter.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-langcode: en
-status: true
-dependencies: {  }
-id: twitter
-label: Twitter
-icon_uuid: null
-description: ''
-behavior_plugins: {  }
diff --git a/tests/modules/custom_elements_test_paragraphs/custom_elements_test_paragraphs.info.yml b/tests/modules/custom_elements_test_paragraphs/custom_elements_test_paragraphs.info.yml
index 1101d48d7011c5b985366f8135b7eb610a5322fb..aeee8d785baf585944002d471f9b79e74771fca7 100644
--- a/tests/modules/custom_elements_test_paragraphs/custom_elements_test_paragraphs.info.yml
+++ b/tests/modules/custom_elements_test_paragraphs/custom_elements_test_paragraphs.info.yml
@@ -1,7 +1,7 @@
 name: Custom Elements Test Paragraphs
 type: module
 description: Paragraphs as provided by Thunder.
-core_version_requirement: ^8.8 || ^9 || ^10
+core_version_requirement: ^10 || ^11
 package: Testing
 hidden: true
 dependencies:
@@ -11,8 +11,6 @@ dependencies:
   - drupal:image
   - drupal:link
   - drupal:media
-  - media_entity_slideshow:media_entity_slideshow
-  - media_entity_twitter:media_entity_twitter
   - drupal:taxonomy
   - drupal:text
   - custom_elements:custom_elements
diff --git a/tests/src/Functional/CustomElementsRenderMarkupTest.php b/tests/src/Functional/CustomElementsRenderMarkupTest.php
index e121de3a46428c6226a736c758a6adaba1740585..b2815cf2ad39a21ba363b244046a62064015c242 100644
--- a/tests/src/Functional/CustomElementsRenderMarkupTest.php
+++ b/tests/src/Functional/CustomElementsRenderMarkupTest.php
@@ -9,11 +9,15 @@ use Drupal\file\Entity\File;
 use Drupal\media\Entity\Media;
 use Drupal\node\Entity\Node;
 use Drupal\paragraphs\Entity\Paragraph;
+use Symfony\Component\Yaml\Parser;
 
 /**
  * Test rendering custom elements into markup.
  *
  * @group custom_elements
+ *
+ * @todo convert these into kernel tests. The only(?) reason this isn't yet,
+ *   is the filesystem copy has not been dealt with.
  */
 class CustomElementsRenderMarkupTest extends BrowserTestBase {
 
@@ -63,9 +67,13 @@ class CustomElementsRenderMarkupTest extends BrowserTestBase {
    */
   protected function setUp(): void {
     parent::setUp();
-    // Install custom_elements_thunder after
-    // custom_elements_test_paragraphs, which contains config dependencies.
-    $this->container->get('module_installer')->install(['custom_elements_thunder'], TRUE);
+    // custom_elements_thunder config depends on custom_elements_test_paragraphs
+    // config, but we can't declare it as a dependency; setting it in $modules
+    // goes wrong (because wrong install order). Install it here.
+    // @todo install full module when all dependencies are D11 compatible
+    //   (module name: custom_elements_thunder) and remove the line below.
+    // $this->container->get('module_installer')->install(['ce_thunder'], TRUE);
+    $this->importPartialThunderConfig(['twitter', 'gallery']);
 
     $this->ceDisplayStorage = \Drupal::service('entity_type.manager')->getStorage('entity_ce_display');
 
@@ -109,6 +117,40 @@ class CustomElementsRenderMarkupTest extends BrowserTestBase {
       ->save();
   }
 
+  /**
+   * Imports custom_elements_thunder config except unsupported modules.
+   *
+   * Only needs to be used when the full module cannot be installed because of
+   * incompatible dependency modules.
+   */
+  private function importPartialThunderConfig(array $exclude_bundles) {
+    $config_dir = dirname(dirname(dirname(__DIR__)))
+      . '/modules/custom_elements_thunder/config/install';
+    // Avoid warnings when opendir does not have the permissions to open a
+    // directory.
+    if ($handle = opendir($config_dir)) {
+      while (FALSE !== ($filename = readdir($handle))) {
+        if (str_ends_with($filename, '.yml') && !array_filter(
+          $exclude_bundles,
+          function ($bundle) use ($filename) {
+            return str_contains($filename, $bundle);
+          }
+        )) {
+          $config_name = substr($filename, 0, strlen($filename) - 4);
+          $data = file_get_contents("$config_dir/$filename");
+          $parser = new Parser();
+          $data = $parser->parse($data);
+          $config = \Drupal::configFactory()->getEditable($config_name);
+          foreach ($data as $data_key => $value) {
+            $config->set($data_key, $value);
+          }
+          $config->save();
+        }
+      }
+      closedir($handle);
+    }
+  }
+
   /**
    * Helper to render a custom element into markup.
    *
diff --git a/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php b/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php
index 89b9bb5c61cdab1e14fcce7b1a136f35ea9eb370..6f642f9b2c249c9cef6b23d355ef442752407dbf 100644
--- a/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php
+++ b/tests/src/Kernel/ThunderParagraphRenderMarkupTest.php
@@ -8,6 +8,7 @@ use Drupal\custom_elements\CustomElementGeneratorTrait;
 use Drupal\file\Entity\File;
 use Drupal\media\Entity\Media;
 use Drupal\paragraphs\Entity\Paragraph;
+use Symfony\Component\Yaml\Parser;
 
 /**
  * Test rendering custom elements using paragraph bundles' CE displays.
@@ -37,8 +38,15 @@ class ThunderParagraphRenderMarkupTest extends KernelTestBase {
     'image',
     'link',
     'media',
-    'media_entity_slideshow',
-    'media_entity_twitter',
+    // @todo uncomment these + tests when there is a D11 compatible release.
+    //   Restor fields + paragraph/media types in custom_elements_test_para,
+    //   re-import all CE displays in setup() and functional tests, and re-add
+    //   modules to composer.json's "require-dev" section and
+    //   custom_elements_test_paragraphs.info.yml.
+    //   Alternatively, state clearly why these won't be tested anymore. (See
+    //   custom_elements_test_paragraphs/README.md.)
+    // 'media_entity_slideshow',
+    // 'media_entity_twitter',
     'node',
     'paragraphs',
     'system',
@@ -81,7 +89,44 @@ class ThunderParagraphRenderMarkupTest extends KernelTestBase {
     $this->installConfig('paragraphs');
     $this->installConfig('user');
     $this->installConfig('custom_elements_test_paragraphs');
-    $this->installConfig('custom_elements_thunder');
+    // @todo reinstate installing all config when we can, and remove
+    //   importPartialParagraphConfig again.
+    // $this->installConfig('custom_elements_thunder');
+    $this->importPartialThunderConfig(['twitter', 'gallery']);
+  }
+
+  /**
+   * Imports custom_elements_thunder config except unsupported modules.
+   *
+   * Only needs to be used when the full module cannot be installed because of
+   * incompatible dependency modules.
+   */
+  private function importPartialThunderConfig(array $exclude_bundles) {
+    $config_dir = dirname(dirname(dirname(__DIR__)))
+      . '/modules/custom_elements_thunder/config/install';
+    // Avoid warnings when opendir does not have the permissions to open a
+    // directory.
+    if ($handle = opendir($config_dir)) {
+      while (FALSE !== ($filename = readdir($handle))) {
+        if (str_ends_with($filename, '.yml') && !array_filter(
+          $exclude_bundles,
+          function ($bundle) use ($filename) {
+            return str_contains($filename, $bundle);
+          }
+        )) {
+          $config_name = substr($filename, 0, strlen($filename) - 4);
+          $data = file_get_contents("$config_dir/$filename");
+          $parser = new Parser();
+          $data = $parser->parse($data);
+          $config = \Drupal::configFactory()->getEditable($config_name);
+          foreach ($data as $data_key => $value) {
+            $config->set($data_key, $value);
+          }
+          $config->save();
+        }
+      }
+      closedir($handle);
+    }
   }
 
   /**
@@ -202,10 +247,18 @@ EOF;
     $this->assertMarkupEquals($expected_markup, $tested_markup);
   }
 
+  // phpcs:disable
+  // @todo reinstate when there's a D11 compatible release; see $modules.
   /**
    * @covers \Drupal\custom_elements_thunder\Processor\ParagraphTwitterProcessor
-   */
+   * /
   public function testTwitterParagraph($vue3_style = FALSE) {
+    // Of note:
+    // - This tests only the most simple rendering of a twitter paragraph. The
+    //   media type also has a field_author and field_content, which are
+    //   output by Thunder's regular entity view displays in certain view modes.
+    // - This file contains no tests for instagram (same field structure as
+    //   twitter) and pinterest (media type only contains field_url) paragraphs.
     $paragraph = Paragraph::create([
       'type' => 'twitter',
       'field_media' => [
@@ -223,6 +276,8 @@ EOF;
     $tested_markup = $this->renderCustomElement($custom_element);
     $this->assertMarkupEquals($expected_markup, $tested_markup);
   }
+  */
+  // phpcs:enable
 
   /**
    * @covers \Drupal\custom_elements_thunder\Processor\ParagraphImageProcessor
@@ -261,9 +316,11 @@ EOF;
     $this->assertMarkupEquals($expected_markup, $tested_markup);
   }
 
+  // phpcs:disable
+  // @todo reinstate when there's a D11 compatible release; see $modules.
   /**
    * @covers \Drupal\custom_elements_thunder\Processor\ParagraphGalleryProcessor
-   */
+   * /
   public function testGalleryParagraph($vue3_style = FALSE) {
     \Drupal::service('file_system')->copy($this->root . '/core/misc/druplicon.png', 'public://example.jpg');
     $image = File::create([
@@ -348,5 +405,6 @@ EOF;
     $tested_markup = $this->renderCustomElement($custom_element);
     $this->assertMarkupEquals($expected_markup, $tested_markup);
   }
-
+  */
+  // phpcs:enable
 }
diff --git a/tests/src/Kernel/ThunderParagraphRenderMarkupVue3Test.php b/tests/src/Kernel/ThunderParagraphRenderMarkupVue3Test.php
index 6cf54fab3d35613a9d2e51f060df04ed14793e7c..c42f51bc97b07e70b74328e277bd38ddf6c283df 100644
--- a/tests/src/Kernel/ThunderParagraphRenderMarkupVue3Test.php
+++ b/tests/src/Kernel/ThunderParagraphRenderMarkupVue3Test.php
@@ -32,18 +32,22 @@ class ThunderParagraphRenderMarkupVue3Test extends ThunderParagraphRenderMarkupT
     parent::testLinkParagraph(TRUE);
   }
 
+  // phpcs:disable
+  // @todo reinstate when there's a D11 compatible release; see parent.
   /**
    * {@inheritdoc}
-   */
+   * /
   public function testTwitterParagraph($vue3_style = FALSE) {
     parent::testTwitterParagraph(TRUE);
   }
 
   /**
    * {@inheritdoc}
-   */
+   * /
   public function testGalleryParagraph($vue3_style = FALSE) {
     parent::testGalleryParagraph(TRUE);
   }
+  */
+  // phpcs:enable
 
 }