// Both the content type created before and after Layout Builder was
// installed is still using the Field UI.
$this->
drupalGet('admin/structure/types/manage/before/display/default'
);
$assert_session->
checkboxNotChecked('layout[enabled]'
);
$field_ui_prefix = 'admin/structure/types/manage/after/display/default';
$this->
drupalGet($field_ui_prefix);
$assert_session->
checkboxNotChecked('layout[enabled]'
);
$page->
checkField('layout[enabled]'
);
$page->
pressButton('Save'
);
$layout_builder_ui =
$this->
getPathForFieldBlock('node', 'after', 'default', 'body'
);
$assert_session->
linkExists('Manage layout'
);
$this->
clickLink('Manage layout'
);
// Ensure the body appears once and only once.
$assert_session->
elementsCount('css', '.field--name-body', 1
);
// Change the body formatter to Trimmed.
$this->
drupalGet($layout_builder_ui);
$assert_session->
fieldValueEquals('settings[formatter][type]', 'text_default'
);
$page->
selectFieldOption('settings[formatter][type]', 'text_trimmed'
);
$assert_session->
assertWaitOnAjaxRequest();