Skip to content
Snippets Groups Projects
Commit 5c331635 authored by James Williams's avatar James Williams Committed by Paulo Henrique Cota Starling
Browse files

Issue #3206625 by james.williams, paulocs: ID attribute is missing from blocks...

Issue #3206625 by james.williams, paulocs: ID attribute is missing from blocks rendered by BlockFieldFormatter
parent 595c0d91
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,7 @@ class BlockFieldFormatter extends FormatterBase implements TrustedCallbackInterf
'#plugin_id' => $block_instance->getPluginId(),
'#base_plugin_id' => $base_id,
'#derivative_plugin_id' => $block_instance->getDerivativeId(),
'#id' => $block_instance->getMachineNameSuggestion(),
'#pre_render' => [
[$this, 'preRender'],
],
......
......@@ -82,7 +82,7 @@ class BlockFieldTest extends BrowserTestBase {
$assert->elementTextContains('css', $selector, $admin_user->label());
$assert->elementContains('css', $selector, '<h2>Block field test content</h2>');
$assert->elementContains('css', $selector, '<div class="block-field-test-content-block--custom-class ');
$assert->elementContains('css', $selector, ' data-custom-attr="block-field-test-content-block--custom-data-attribute">');
$assert->elementContains('css', $selector, ' data-custom-attr="block-field-test-content-block--custom-data-attribute"');
$assert->elementTextContains('css', $selector, 'This block was created at');
$assert->elementContains('css', $selector, '<h2>The time is...</h2>');
$assert->responseMatches('/\d\d:\d\d:\d\d/');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment