Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
openAddBlockForm example
$this
->
drupalGet
(
$node_url
)
;
$assert_session
->
pageTextContains
(
'The node body'
)
;
// Enter the layout editing mode.
$assert_session
->
linkExists
(
'Layout'
)
;
$this
->
clickLink
(
'Layout'
)
;
$this
->
markCurrentPage
(
)
;
$assert_session
->
pageTextContains
(
'The node body'
)
;
$assert_session
->
linkExists
(
'Add section'
)
;
// Add a new block.
$this
->
openAddBlockForm
(
'Powered by Drupal'
)
;
$page
->
fillField
(
'settings[label]', 'This is the label'
)
;
$page
->
checkField
(
'settings[label_display]'
)
;
// Save the new block, and ensure it is displayed on the page.
$page
->
pressButton
(
'Add block'
)
;
$assert_session
->
assertWaitOnAjaxRequest
(
)
;
$assert_session
->
assertNoElementAfterWait
(
'css', '#drupal-off-canvas'
)
;
$assert_session
->
addressEquals
(
$layout_url
)
;
$assert_session
->
pageTextContains
(
'Powered by Drupal'
)
;
$assert_session
->
pageTextContains
(
'This is the label'
)
;