[2.0.0-beta2] Layouts: Tests

Created on 12 August 2024, 9 months ago

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?)
πŸ“Œ Task
Status

Active

Version

2.0

Component

UI Patterns Layouts

Created by

πŸ‡«πŸ‡·France just_like_good_vibes PARIS

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

Merge Requests

Comments & Activities

  • Issue created by @just_like_good_vibes
  • πŸ‡«πŸ‡·France pdureau Paris
  • πŸ‡«πŸ‡·France pdureau Paris
  • πŸ‡©πŸ‡ͺGermany Christian.wiedemann

    christian.wiedemann β†’ made their first commit to this issue’s fork.

  • πŸ‡©πŸ‡ͺGermany Christian.wiedemann

    Hi checked the tests right now. I think Mikael had everything implemented expect the field ui stuff? Am I right?

  • πŸ‡©πŸ‡ͺGermany Christian.wiedemann

    What do you think is missing? Just let me know

  • πŸ‡«πŸ‡·France just_like_good_vibes PARIS

    hello, i think yes, everything has been already done, especially in πŸ“Œ [2.0.0-beta3] Sources: Tests Active 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

  • πŸ‡«πŸ‡·France just_like_good_vibes PARIS

    hello, i think yes, everything has been already done, especially in πŸ“Œ [2.0.0-beta3] Sources: Tests Active 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.

  • Status changed to Needs work 5 months ago
  • πŸ‡«πŸ‡·France pdureau Paris
  • Merge request !296Add test for field layout β†’ (Merged) created by Christian.wiedemann
  • Pipeline finished with Failed
    5 months ago
    Total: 214s
    #364514
  • Pipeline finished with Failed
    5 months ago
    Total: 355s
    #364521
  • πŸ‡©πŸ‡ͺGermany Christian.wiedemann

    I 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?

  • Pipeline finished with Failed
    5 months ago
    Total: 275s
    #364615
  • Pipeline finished with Failed
    5 months ago
    Total: 365s
    #364620
  • πŸ‡«πŸ‡·France just_like_good_vibes PARIS

    Hello Christian,
    you set in review but the MR is not green ?
    do i still need to review it?

  • πŸ‡«πŸ‡·France pdureau Paris
    1) Drupal\Tests\ui_patterns_layouts\Functional\FieldLayoutRenderTest::testRenderForm
    Behat\Mink\Exception\ElementNotFoundException: Element matching css ".field--name-body" not found.
    /builds/project/ui_patterns/vendor/behat/mink/src/WebAssert.php:465
    /builds/project/ui_patterns/modules/ui_patterns_layouts/tests/src/Functional/FieldLayoutRenderTest.php:115
    
    2) Drupal\Tests\ui_patterns_layouts\Functional\LayoutBuilderRenderTest::testRenderProps
    Behat\Mink\Exception\ElementNotFoundException: Element matching css ".layout-builder-block" not found.
    /builds/project/ui_patterns/vendor/behat/mink/src/WebAssert.php:465
    /builds/project/ui_patterns/modules/ui_patterns_layouts/tests/src/Functional/LayoutBuilderRenderTest.php:78
    
  • πŸ‡«πŸ‡·France pdureau Paris

    The remaining problem is from $build[$region_name] = $regions[$region_name]; we did for Layout Builder integration, but may not work well with Field Layout.

    We don't need to test with the Entity Form Displays because SDC is not compatible with the Form API yet, but Field Layout can also be used with Entity View Displays instead of Layout Builder.

  • πŸ‡«πŸ‡·France just_like_good_vibes PARIS

    i take it back to check and finish for merge

  • Pipeline finished with Failed
    4 months ago
    Total: 377s
    #367084
  • Pipeline finished with Failed
    4 months ago
    Total: 604s
    #373010
  • Pipeline finished with Canceled
    4 months ago
    Total: 85s
    #373582
  • Pipeline finished with Canceled
    4 months ago
    Total: 337s
    #373583
  • Pipeline finished with Failed
    4 months ago
    Total: 551s
    #373591
  • πŸ‡«πŸ‡·France just_like_good_vibes PARIS

    i added a few minor changes.
    and removed the unwanted tests. please review Christian :)

  • Pipeline finished with Success
    4 months ago
    Total: 635s
    #373631
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Failed
    27 days ago
    Total: 1572s
    #459653
  • Pipeline finished with Failed
    27 days ago
    Total: 1642s
    #459685
  • Pipeline finished with Success
    17 days ago
    Total: 1570s
    #468262
  • Pipeline finished with Failed
    16 days ago
    Total: 1408s
    #468376
  • Pipeline finished with Failed
    16 days ago
    Total: 975s
    #468410
  • Pipeline finished with Success
    16 days ago
    Total: 2414s
    #468423
  • Pipeline finished with Success
    16 days ago
    Total: 1531s
    #468453
Production build 0.71.5 2024