Problem/Motivation
Improve tests for layouts
Remaining tasks
- Test deriver plugin
- Test rendering : verify entity context is correctly passed to source plugins (slots and props), especially in the case of layout builder and field layout display (and field layout form?)
- Tests of possible integration ? inside layout builder, inside field layout display (and field layout form?)
Issue fork ui_patterns-3467656
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
pdureau commentedComment #3
pdureau commentedComment #5
christian.wiedemann commentedHi checked the tests right now. I think Mikael had everything implemented expect the field ui stuff? Am I right?
Comment #6
christian.wiedemann commentedWhat do you think is missing? Just let me know
Comment #7
just_like_good_vibeshello, i think yes, everything has been already done, especially in #3467657: [2.0.0-beta3] Sources: Tests for example.
- Test deriver plugin : ok
- test rendering with field layout :
modules/ui_patterns_layouts/tests/src/Functional/LayoutFieldFormatterRenderTest.php- test rendering with layout builder :
modules/ui_patterns_layouts/tests/src/Functional/LayoutBuilderFieldFormatterRenderTest.php- tests form integration in layout builder : modules/ui_patterns_layouts/tests/src/Functional/LayoutBuilderRenderTest.php
Comment #8
just_like_good_vibeshello, i think yes, everything has been already done, especially in #3467657: [2.0.0-beta3] Sources: Tests for example.
- Test deriver plugin : ok
- test rendering with field layout :
modules/ui_patterns_layouts/tests/src/Functional/LayoutFieldFormatterRenderTest.php- test rendering with layout builder :
modules/ui_patterns_layouts/tests/src/Functional/LayoutBuilderFieldFormatterRenderTest.php- tests form integration in layout builder : modules/ui_patterns_layouts/tests/src/Functional/LayoutBuilderRenderTest.php
maybe what is missing is "Tests of possible integration ? iinside field layout display (and field layout form?)"
We should decide if we write a new test case for this or not.
Comment #9
just_like_good_vibesComment #10
pdureau commentedComment #11
christian.wiedemann commentedComment #12
christian.wiedemann commentedComment #14
christian.wiedemann commentedI found two bugs with field layout. One I fixed with empty context for field_layouts. The rendering of forms inside a layout leads right now to empty slot because our Layout Component overwrites the build keys inside the region. This is also the reason why one test fails.
So should we support field_layout forms?
Comment #15
christian.wiedemann commentedComment #16
just_like_good_vibesHello Christian,
you set in review but the MR is not green ?
do i still need to review it?
Comment #17
pdureau commentedComment #18
pdureau commentedThe remaining problem is from
$build[$region_name] = $regions[$region_name];we did for Layout Builder integration, but may not work well with Field Layout with Entity Form Displays.We don't need to test with the Entity Form Displays because SDC is not compatible with the Form API yet, so do we remove the related tests and merge the relevant tests?
Comment #19
just_like_good_vibesi take it back to check and finish for merge
Comment #20
just_like_good_vibesComment #21
just_like_good_vibesi added a few minor changes.
and removed the unwanted tests. please review Christian :)
Comment #23
christian.wiedemann commentedComment #25
christian.wiedemann commented