Unverified Commit c3615d23 authored by alexpott's avatar alexpott

Issue #2981042 by seanB, chr.fritsch, phenaproxima, marcoscano: Add empty text to Media view

parent cb67958d
......@@ -811,7 +811,7 @@ display:
admin_label: ''
empty: true
tokenize: false
content: 'No content available.'
content: 'No media available.'
plugin_id: text_custom
relationships: { }
arguments: { }
......
......@@ -54,7 +54,7 @@ public function testMediaOverviewPage() {
$this->assertEquals('Updated Sort ascending', $header->getText());
$header = $assert_session->elementExists('css', 'th#view-operations-table-column');
$this->assertEquals('Operations', $header->getText());
$assert_session->pageTextContains('No content available.');
$assert_session->pageTextContains('No media available.');
// Create some content for the view.
$media_type1 = $this->createMediaType('test');
......
......@@ -363,7 +363,18 @@ display:
title: Media
header: { }
footer: { }
empty: { }
empty:
area_text_custom:
id: area_text_custom
table: views
field: area_text_custom
relationship: none
group_type: group
admin_label: ''
empty: true
tokenize: false
content: 'No media available.'
plugin_id: text_custom
relationships: { }
arguments:
bundle:
......
......@@ -97,6 +97,19 @@ public function testAdministrationPage() {
$this->submitForm([], 'Delete');
$assert_session->pageTextNotContains('media_1');
$assert_session->pageTextContains('media_2');
// Test 'Select all media'.
$this->getSession()->getPage()->checkField('Select all media');
$this->getSession()->getPage()->selectFieldOption('Action', 'media_delete_action');
$this->submitForm([], 'Apply to selected items');
$this->getSession()->getPage()->pressButton('Delete');
$assert_session->pageTextNotContains('media_2');
$assert_session->pageTextNotContains('media_3');
$assert_session->pageTextNotContains('media_4');
// Test empty text.
$assert_session->pageTextContains('No media available.');
}
}
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