// The "Add Node" link triggers an off-canvas dialog with an add node form
// that includes CKEditor.
$page->clickLink('Add Node'); $assert_session->waitForElementVisible('css', '#drupal-off-canvas-wrapper'); $assert_session->assertWaitOnAjaxRequest();
// Add a node with text rendered via the Plain Text format.
$this->drupalGet('node/add'); $page->fillField('title[0][value]', 'My test content'); $page->fillField('body[0][value]', '<p>This is test content</p>'); $page->pressButton('Save'); $assert_session->responseNotContains('<p>This is test content</p>'); $assert_session->responseContains('<p>This is test content</p>');
$this->addNewTextFormat($page, $assert_session);
// Change the node to use the new text format.
$this->drupalGet('node/1/edit');