Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Updated: Comment #0
Problem/Motivation
Similar to the /node/add page, if there is only one custom block type, /block/add skips right to the form for that type.
However, all of the UI test coverage for the custom block type workflows assume only one block.
This leads to problems in issues like #2062439: Provide listing of custom block entities, where this workflow is left untouched.
Proposed resolution
Add full test coverage, with clickLink() not drupalGet() to ensure everything actually works
Remaining tasks
Write tests
User interface changes
N/A
API changes
N/A
Related Issues
N/A
Comment | File | Size | Author |
---|---|---|---|
#7 | custom-block-multiple-2064591.7.interdiff.txt | 4.02 KB | larowlan |
#7 | custom-block-multiple-2064591.7.patch | 3.89 KB | larowlan |
#2 | custom-block-multiple-2064591.fail_.patch | 2.81 KB | larowlan |
#2 | custom-block-multiple-2064591.pass_.patch | 3.82 KB | larowlan |
Comments
Comment #1
larowlancause I can't face comment field
Comment #2
larowlanhoping for red/green
Comment #3
tim.plunkettI'm surprised we have to check this! Hm.
Partially out of scope, but this would look way better as a render array with '#type' => 'link'.
Can we change this to
// Creates two block types programmatically.
? There is a typo, and the important part here is that there are two.Might as well put this in a local variable
Can't these be $this->assertUrl()?
Missing blank line
Comment #4
larowlanCommented on #2025669: Introduce #type 'custom_block_add_list', agree out of scope.
3-6 yep will fix
Comment #5
larowlan1. we can try without it
Comment #6
larowlanfixing
Comment #7
larowlanFixes issues at #3 except 1.
We don't want the destination to be set as /block/add because the form redirects back there instead. I.e. we only want drupal_get_destination() to give us the ?destination= bit, the fallback is to use the current page and this sends us back to /block/add.
Have updated the comment so its clear.
Comment #8
tim.plunkettFair point! Thanks so much.
Comment #9
catchComment #10
catchCommitted/pushed to 8.x, thanks!
Comment #11
xjmSee #2068053: Custom block creation form redirect is inconsistent. If this issue was intended to fix that bug, it is (a) mis-titled and (b) not successful. :)
Comment #12
xjmComment #13
xjmComment #14
tim.plunkettI'm reopening that one then. This did what it said.