Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
openFieldDialog example
\Drupal::
configFactory
(
)
->
getEditable
(
'views.settings'
)
->
set
(
'ui.always_live_preview', FALSE
)
->
save
(
)
;
$this
->
drupalLogin
(
$admin_user
)
;
}
/** * Tests removing a field through the rearrange dialog. */
public
function
testRemoveFieldHandler
(
)
{
$this
->
drupalGet
(
'admin/structure/views/view/test_content_ajax'
)
;
$page
=
$this
->
getSession
(
)
->
getPage
(
)
;
$this
->
openFieldDialog
(
)
;
$remove_link
=
$page
->
findAll
(
'css', '.views-remove-link'
)
[
1
]
;
$parent
=
$remove_link
->
getParent
(
)
;
$this
->
assertTrue
(
$remove_link
->
isVisible
(
)
)
;
$remove_checkbox
=
$this
->
assertSession
(
)
->
fieldExists
(
'fields[title][removed]',
$parent
)
;
$this
->
assertFalse
(
$remove_checkbox
->
isVisible
(
)
)
;
$this
->
assertFalse
(
$remove_checkbox
->
isChecked
(
)
)
;
$remove_link
->
click
(
)
;
$this
->
assertFalse
(
$remove_link
->
isVisible
(
)
)
;
$this
->
assertTrue
(
$remove_checkbox
->
isChecked
(
)
)
;
}