Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assertEditModeEnabled example
$block
->
mouseOver
(
)
;
$block
->
click
(
)
;
$this
->
waitForOffCanvasToOpen
(
)
;
$this
->
assertOffCanvasBlockFormIsValid
(
)
;
}
/** * Enables edit mode by pressing edit button in the toolbar. */
protected
function
enableEditMode
(
)
{
$this
->
pressToolbarEditButton
(
)
;
$this
->
assertEditModeEnabled
(
)
;
}
/** * Disables edit mode by pressing edit button in the toolbar. */
protected
function
disableEditMode
(
)
{
$this
->
assertSession
(
)
->
assertWaitOnAjaxRequest
(
)
;
$this
->
pressToolbarEditButton
(
)
;
$this
->
assertEditModeDisabled
(
)
;
}
foreach
(
$this
->
getTestThemes
(
)
as
$theme
)
{
$this
->
enableTheme
(
$theme
)
;
$block
=
$this
->
placeBlock
(
'system_powered_by_block'
)
;
foreach
(
[
'contextual_link', 'toolbar_link'
]
as
$enable_option
)
{
$this
->
drupalGet
(
'user'
)
;
$this
->
assertEditModeDisabled
(
)
;
switch
(
$enable_option
)
{
// Enable Edit mode.
case
'contextual_link':
$this
->
clickContextualLink
(
$this
->
getBlockSelector
(
$block
)
, "Quick edit"
)
;
$this
->
waitForOffCanvasToOpen
(
)
;
$this
->
assertEditModeEnabled
(
)
;
break
;
case
'toolbar_link':
$this
->
enableEditMode
(
)
;
break
;
}
$this
->
disableEditMode
(
)
;
// Make another page request to ensure Edit mode is still disabled.
$this
->
drupalGet
(
'user'
)
;
$this
->
assertEditModeDisabled
(
)
;