Unverified Commit 91ab96a6 authored by alexpott's avatar alexpott
Browse files

Issue #2983346 by Krilo_89, pguillard, marcoscano, sjerdo: "Add media" button...

Issue #2983346 by Krilo_89, pguillard, marcoscano, sjerdo: "Add media" button missing in the media library table display
parent 94718428
......@@ -2,4 +2,4 @@ media_library.add:
route_name: entity.media.add_page
title: 'Add media'
- view.media_library.page
- view.media.media_page_list
......@@ -61,6 +61,8 @@ protected function setUp() {
* Tests that the Media library's administration page works as expected.
public function testAdministrationPage() {
$session = $this->getSession();
$page = $session->getPage();
$assert_session = $this->assertSession();
// Visit the administration page.
......@@ -74,20 +76,20 @@ public function testAdministrationPage() {
// Test that users can filter by type.
$this->getSession()->getPage()->selectFieldOption('Media type', 'Type One');
$this->getSession()->getPage()->pressButton('Apply Filters');
$page->selectFieldOption('Media type', 'Type One');
$page->pressButton('Apply Filters');
$this->getSession()->getPage()->selectFieldOption('Media type', 'Type Two');
$this->getSession()->getPage()->pressButton('Apply Filters');
$page->selectFieldOption('Media type', 'Type Two');
$page->pressButton('Apply Filters');
// Test that selecting elements as a part of bulk operations works.
$this->getSession()->getPage()->selectFieldOption('Media type', '- Any -');
$this->getSession()->getPage()->pressButton('Apply Filters');
$page->selectFieldOption('Media type', '- Any -');
$page->pressButton('Apply Filters');
// This tests that anchor tags clicked inside the preview are suppressed.
$this->getSession()->executeScript('jQuery(".js-click-to-select__trigger a")[0].click()');
......@@ -110,6 +112,13 @@ public function testAdministrationPage() {
// Test empty text.
$assert_session->pageTextContains('No media available.');
// Verify that the "Table" link is present, click it and check address.
// Verify that the "Add media" link is present.
$assert_session->linkExists('Add media');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment