diff --git a/core/modules/node/content_types.js b/core/modules/node/content_types.js index eed93f0..4ec34aa 100644 --- a/core/modules/node/content_types.js +++ b/core/modules/node/content_types.js @@ -26,7 +26,7 @@ }); $context.find('#edit-workflow').drupalSetSummary(function (context) { var vals = []; - $(context).find('input[name^="options"]:checked').parent().each(function () { + $(context).find('input[name^="options"]:checked').next('label').each(function () { vals.push(Drupal.checkPlain($(this).text())); }); if (!$(context).find('#edit-options-status').is(':checked')) { diff --git a/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php b/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php new file mode 100644 index 0000000..bd92a83 --- /dev/null +++ b/core/modules/node/tests/src/FunctionalJavascript/TestSettingSummariesContentType.php @@ -0,0 +1,43 @@ +drupalCreateUser(['administer content types']); + $this->drupalLogin($admin_user); + $this->drupalCreateContentType(['type' => 'test']); + } + + /** + * Test a vertical tab 'Workflow' summary. + */ + public function testWorkflowSummary() { + $this->drupalGet('admin/structure/types/manage/test'); + $session = $this->getSession(); + $page = $session->getPage(); + + $locator = '[href=\#edit-workflow] .vertical-tabs__menu-item-summary'; + $summary = $page->find('css', $locator)->getText(); + $this->assertContains('Published, Promoted to front page', $summary); + } + +}