function SettingSummariesContentTypeTest::testWorkflowSummary
Same name in other branches
- 9 core/modules/node/tests/src/FunctionalJavascript/SettingSummariesContentTypeTest.php \Drupal\Tests\node\FunctionalJavascript\SettingSummariesContentTypeTest::testWorkflowSummary()
- 10 core/modules/node/tests/src/FunctionalJavascript/SettingSummariesContentTypeTest.php \Drupal\Tests\node\FunctionalJavascript\SettingSummariesContentTypeTest::testWorkflowSummary()
Tests a vertical tab 'Workflow' summary.
File
-
core/
modules/ node/ tests/ src/ FunctionalJavascript/ SettingSummariesContentTypeTest.php, line 40
Class
- SettingSummariesContentTypeTest
- Tests the JavaScript updating of summaries on content type form.
Namespace
Drupal\Tests\node\FunctionalJavascriptCode
public function testWorkflowSummary() : void {
$this->drupalGet('admin/structure/types/manage/test');
$page = $this->getSession()
->getPage();
$page->find('css', 'a[href="#edit-workflow"]')
->click();
$this->assertSession()
->waitForElementVisible('css', '[name="options[status]"]');
$page->findField('options[status]')
->uncheck();
$page->findField('options[sticky]')
->check();
$page->findField('options[promote]')
->check();
$page->findField('options[revision]')
->check();
$summary = 'Not published, Promoted to front page, Sticky at top of lists, Create new revision';
$locator = '[href="#edit-workflow"] .vertical-tabs__menu-item-summary:contains("' . $summary . '")';
$this->assertNotEmpty($this->assertSession()
->waitForElement('css', $locator));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.