Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
switchToMediaLibraryGrid example
$assert_session
->
pageTextNotContains
(
'Turtle'
)
;
// Assert the exposed filters can be applied.
$page
->
fillField
(
'Name', 'Dog'
)
;
$page
->
pressButton
(
'Apply filters'
)
;
$assert_session
->
assertWaitOnAjaxRequest
(
)
;
$assert_session
->
pageTextContains
(
'Dog'
)
;
$assert_session
->
pageTextNotContains
(
'Crocodile'
)
;
$assert_session
->
pageTextNotContains
(
'Turtle'
)
;
$page
->
checkField
(
'Select Dog'
)
;
$assert_session
->
linkExists
(
'Table'
)
;
$this
->
switchToMediaLibraryGrid
(
)
;
// Assert the exposed filters are persisted when changing display.
$this
->
assertSame
(
'Dog',
$page
->
findField
(
'Name'
)
->
getValue
(
)
)
;
$assert_session
->
pageTextContains
(
'Dog'
)
;
$assert_session
->
pageTextNotContains
(
'Crocodile'
)
;
$assert_session
->
pageTextNotContains
(
'Turtle'
)
;
$assert_session
->
linkExists
(
'Grid'
)
;
$this
->
switchToMediaLibraryTable
(
)
;
// Select the item.
$this
->
pressInsertSelected
(
'Added one media item.'
)
;