Skip to content
Snippets Groups Projects

Allow media_library to add contextual filters properly.

4 unresolved threads

Closes #3401726

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
48 $assert_session = $this->assertSession();
49 $session = $this->getSession();
50
51 // Create users for adding media and using the media library.
52 $permissions = [
53 'access administration pages',
54 'access content',
55 'create basic_page content',
56 'create type_one media',
57 'view media',
58 ];
59 $user1 = $this->createUser($permissions, 'user 1');
60 $user2 = $this->createUser($permissions, 'user 2');
61
62 // Login with user 1 and create media items.
63 $this->drupalLogin($user1);
  • 19 protected static $modules = ['views_ui'];
    20
    21 /**
    22 * {@inheritdoc}
    23 */
    24 protected $defaultTheme = 'stark';
    25
    26 /**
    27 * {@inheritdoc}
    28 */
    29 protected function setUp(): void {
    30 parent::setUp();
    31
    32 $assert_session = $this->assertSession();
    33 $session = $this->getSession();
    34 $page = $session->getPage();
  • 34 $page = $session->getPage();
    35
    36 // Create an admin user to update the view.
    37 $adminUser = $this->createUser([], 'admin user', TRUE);
    38 // Add media author as a contextual filter to the widget display.
    39 $this->drupalLogin($adminUser);
    40 $this->addMediaAuthorContextualFilterToDisplay('media_library', 'widget');
    41 $this->addMediaAuthorContextualFilterToDisplay('media_library', 'widget_table');
    42 }
    43
    44 /**
    45 * Test contextual filters in the media library.
    46 */
    47 public function testMediaLibraryContextualFilter(): void {
    48 $assert_session = $this->assertSession();
    49 $session = $this->getSession();
  • Pooja Sharma added 1 commit

    added 1 commit

    • 78da8ab9 - issue/3401726: Applied suggestions to optimize MediaLibraryContextualFilterTest

    Compare with previous version

  • Pooja Sharma added 1 commit

    added 1 commit

    • f762f100 - issue/3401726: fixing pipeline test failures.

    Compare with previous version

  • Pooja Sharma added 1 commit

    added 1 commit

    • e3dbcc37 - issue/3401726: fixing pipeline test failure.

    Compare with previous version

  • Pooja Sharma
    Pooja Sharma @pooja_sharma started a thread on an outdated change in commit 292e3454
  • 44 }
    45
    46 /**
    47 * Test contextual filters in the media library.
    48 */
    49 public function testMediaLibraryContextualFilter(): void {
    50 $assert_session = $this->assertSession();
    51 $session = $this->getSession();
    52
    53 // Create users for adding media and using the media library.
    54 $permissions = [
    55 'access administration pages',
    56 'access content',
    57 'create basic_page content',
    58 'create type_one media',
    59 'view media',
  • Pooja Sharma added 262 commits

    added 262 commits

    • e3dbcc37...37d8ea5c - 255 commits from branch project:11.x
    • 8c062806 - Allow media_library to add contextual filters properly.
    • f24e7a26 - Add test for contextual filters on the media library widget displays.
    • ff34b4a2 - Remove unnecessary use statement.
    • 361ee8c2 - Fix codesniffer findings.
    • 2c9d92bb - issue/3401726: Applied suggestions to optimize MediaLibraryContextualFilterTest
    • a3036213 - issue/3401726: fixing pipeline test failures.
    • ccb84605 - issue/3401726: fixing pipeline test failure.

    Compare with previous version

  • Pooja Sharma added 1 commit

    added 1 commit

    • 6cc3d107 - issue/3401726: fixing test failure.

    Compare with previous version

  • Hervé Donner added 1 commit

    added 1 commit

    • ffcfbcb5 - Create Views handler programmatically, add extra steps.

    Compare with previous version

  • Pavlos Daniel added 77 commits

    added 77 commits

    • ffcfbcb5...cfdd150c - 68 commits from branch project:11.x
    • 6c41f13b - Allow media_library to add contextual filters properly.
    • eec45bb3 - Add test for contextual filters on the media library widget displays.
    • 76a29abb - Remove unnecessary use statement.
    • 8dd89e47 - Fix codesniffer findings.
    • 58bba05e - issue/3401726: Applied suggestions to optimize MediaLibraryContextualFilterTest
    • c9279ad8 - issue/3401726: fixing pipeline test failures.
    • 10cb3316 - issue/3401726: fixing pipeline test failure.
    • 9a196dcf - issue/3401726: fixing test failure.
    • fe688403 - Create Views handler programmatically, add extra steps.

    Compare with previous version

  • Please register or sign in to reply
    Loading