diff --git a/core/modules/media_entity/tests/src/FunctionalJavascript/MediaHandlerTestBase.php b/core/modules/media_entity/tests/src/FunctionalJavascript/MediaHandlerTestBase.php index c74b2bf2b8a2c85bfa6942464796abbfe0a815b2..0f6a79d90ed2860a4d23b21fb57013f60b8bb132 100644 --- a/core/modules/media_entity/tests/src/FunctionalJavascript/MediaHandlerTestBase.php +++ b/core/modules/media_entity/tests/src/FunctionalJavascript/MediaHandlerTestBase.php @@ -63,6 +63,11 @@ public function createMediaBundleTest($bundle_name, $bundle_type, array $provide $this->drupalGet('admin/structure/media'); $assert_session->pageTextContains($bundle_name); + // Bundle definitions are statically cached in the context of the test, we + // need to make sure we have updated information before proceeding with the + // actions on the UI. + \Drupal::service('entity_type.bundle.info')->clearCachedBundles(); + return MediaBundle::load($bundle_name); }