Overview
Discovered in #3530351: Decouple image+video (URI) shape matching from specific image+video file types/extensions. This bug makes that MR harder to understand.
#3535453: Create an Image SDC that can be included by other SDCs started using Drupal 11.3's new noUi: true support (#3535958: Allow SDCs to be marked to be excluded from UI).
It uses it for 2 SDCs:
components/image(which was the key purpose of #3535453: Create an Image SDC that can be included by other SDCs!tests/modules/xb_test_sdc/components/no-ui-sdc(for testing purposes
Great!
But because noUi: true only landed in 11.3, not in 11.2 (which XB must support, because 11.3 won't be out at DrupalCon Vienna), it's tricky to actually support this. And hence … our e2e tests are actually asserting that both of these SDCs do appear in the UI 😅🐛
Proposed resolution
Update test expectations + fix.
User interface changes
Issue fork experience_builder-3543770
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
Comment #2
wim leers#3537695: [11.3.0-and-up] Remove hardcoded Image SDC from `\Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\SingleDirectoryComponent::componentMeetsRequirements` is supposed to remove the hard-coded checks, but more checks are needed.
Comment #4
wim leersComment #5
wim leersWTF, the snapshot tests still passed?!
Investigated, and turns out this is because Playwright defaults to saying "yep, this is valid", if the expectation is a subset of the actual! 🤯🫠
Looks like we need
/children: deep-equaleverywhere? 😅Out of scope here, opening new issue for it …
EDIT: done: #3543779: CI: Playwright ARIA snapshot testing is highly misleading — subsets are considered valid.
Comment #6
wim leersThis is definitely on me — I should've spotted this in my reviews of #3535453: Create an Image SDC that can be included by other SDCs!
Should be fully green now!
Comment #7
penyaskitoRTBC if green
Comment #8
wim leersComment #10
fjgarlin commentedDisregard comment. Fixing indexing issue.