function TableTest::assertTableStructureInRenderedPage
Same name in other branches
- 9 core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php \Drupal\Tests\ckeditor5\FunctionalJavascript\TableTest::assertTableStructureInRenderedPage()
- 11.x core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php \Drupal\Tests\ckeditor5\FunctionalJavascript\TableTest::assertTableStructureInRenderedPage()
Confirms the saved page has the expected table structure.
2 calls to TableTest::assertTableStructureInRenderedPage()
- TableTest::testTableCaptionUi in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ TableTest.php - Tests creating a table with caption in the UI.
- TableTest::testTableConversion in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ TableTest.php - Confirms tables convert to the expected markup.
File
-
core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ TableTest.php, line 221
Class
- TableTest
- For testing the table plugin.
Namespace
Drupal\Tests\ckeditor5\FunctionalJavascriptCode
public function assertTableStructureInRenderedPage() : void {
$assert_session = $this->assertSession();
$page = $this->getSession()
->getPage();
$page->pressButton('Save');
$assert_session->waitForText('has been updated');
$assert_session->pageTextContains($this->tableCellText);
$assert_session->pageTextContains($this->captionText);
$assert_session->elementNotExists('css', 'figure');
$this->assertNotNull($table_cell = $page->find('css', 'table > tbody > tr > td'), 'Table on rendered page has expected structure');
$this->assertEquals($this->tableCellText, $table_cell->getText(), 'Table on rendered page has expected content');
$this->assertNotNull($table_caption = $page->find('css', 'table > caption '), 'Table caption is in expected structure.');
$this->assertEquals($this->captionText, $table_caption->getText(), 'Table caption has expected text');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.