// Assert the 'Apply filter' button is not moved to the button pane.
$button_pane =
$assert_session->
elementExists('css', '.ui-dialog-buttonpane'
);
$assert_session->
buttonExists('Insert selected',
$button_pane);
$assert_session->
buttonNotExists('Apply filters',
$button_pane);
// Assert the pager works as expected.
// An active pager item is not linked and contains "Page #" as text.
$assert_session->
elementTextContains('css', '.js-media-library-view .js-pager__items > li:nth-of-type(1)', 'Page 1'
);
$assert_session->
elementNotExists('css', '.js-media-library-view .js-pager__items > li:nth-of-type(1) a'
);
$assert_session->
elementExists('css', '.js-media-library-view .js-pager__items > li:nth-of-type(2) a'
);
$this->
assertCount(24,
$this->
getCheckboxes());
$page->
clickLink('Next page'
);
$this->
waitForElementTextContains('.js-media-library-view .js-pager__items > li:nth-of-type(2)', 'Page 2'
);
$assert_session->
elementExists('css', '.js-media-library-view .js-pager__items > li:nth-of-type(1) a'
);
$assert_session->
elementNotExists('css', '.js-media-library-view .js-pager__items > li:nth-of-type(2) a'
);
$this->
assertCount(1,
$this->
getCheckboxes());
$page->
clickLink('Previous page'
);
$this->
waitForElementTextContains('.js-media-library-view .js-pager__items > li:nth-of-type(1)', 'Page 1'
);
$this->
assertCount(24,
$this->
getCheckboxes());
$page->
checkField('Select Bear'
);
$this->
pressInsertSelected('Added one media item.'
);