'create basic_page content',
'view media',
]);
$this->
drupalGet('admin/content/media-widget',
$url_options);
$assert_session->
elementExists('css', '.js-media-library-view'
);
$this->
drupalGet('admin/content/media-widget-table',
$url_options);
$assert_session->
elementExists('css', '.js-media-library-view'
);
$this->
drupalGet('media-library',
$url_options);
$assert_session->
elementExists('css', '.js-media-library-view'
);
// Assert the user does not have access to the media add form if the user
// does not have the 'create media' permission.
$assert_session->
fieldNotExists('files[upload][]'
);
// Assert users can not access the widget displays of the media library view
// without a valid media library state.
$this->
drupalGet('admin/content/media-widget'
);
$assert_session->
responseContains('Access denied'
);
$this->
drupalGet('admin/content/media-widget-table'
);
$assert_session->
responseContains('Access denied'
);
$this->
drupalGet('media-library'
);
$assert_session->
responseContains('Access denied'
);
// Assert users with the 'create media' permission can access the media add