diff --git a/core/drupalci.yml b/core/drupalci.yml
index cd92d8102d..196626e179 100644
--- a/core/drupalci.yml
+++ b/core/drupalci.yml
@@ -3,49 +3,16 @@
 # https://www.drupal.org/drupalorg/docs/drupal-ci/customizing-drupalci-testing
 _phpunit_testgroups_to_execute: &testgroups
   # Default: all of Drupal core's test suite runs.
-  testgroups: '--all'
+  testgroups: '--class "\Drupal\Tests\media_library\FunctionalJavascript\EntityReferenceWidgetTest"'
   # Alternative: run only the tests for one particular module.
   # testgroups: '--module ckeditor5'
 build:
   assessment:
     testing:
-      # Run code quality checks.
-      container_command.commit-checks:
-        commands:
-          - "core/scripts/dev/commit-code-check.sh --drupalci"
-        halt-on-fail: true
-      # run_tests task is executed several times in order of performance speeds.
-      # halt-on-fail can be set on the run_tests tasks in order to fail fast.
-      # suppress-deprecations is false in order to be alerted to usages of
-      # deprecated code.
-      run_tests.phpunit:
-        types: 'PHPUnit-Unit'
-        suppress-deprecations: false
-        halt-on-fail: false
-        <<: *testgroups
-      run_tests.kernel:
-        types: 'PHPUnit-Kernel'
-        suppress-deprecations: false
-        halt-on-fail: false
-        <<: *testgroups
-      run_tests.build:
-        # Limit concurrency due to disk space concerns.
-        concurrency: 15
-        types: 'PHPUnit-Build'
-        suppress-deprecations: false
-        halt-on-fail: false
-        <<: *testgroups
-      run_tests.functional:
-        types: 'PHPUnit-Functional'
-        suppress-deprecations: false
-        halt-on-fail: false
-        <<: *testgroups
       run_tests.javascript:
         concurrency: 15
         types: 'PHPUnit-FunctionalJavascript'
         suppress-deprecations: false
         halt-on-fail: false
         <<: *testgroups
-      # Run nightwatch testing.
-      # @see https://www.drupal.org/project/drupal/issues/2869825
-      nightwatchjs: {}
+        repeat: 1500
diff --git a/core/lib/Drupal/Core/Extension/InfoParserDynamic.php b/core/lib/Drupal/Core/Extension/InfoParserDynamic.php
index 8298223a37..4f4b0e0b88 100644
--- a/core/lib/Drupal/Core/Extension/InfoParserDynamic.php
+++ b/core/lib/Drupal/Core/Extension/InfoParserDynamic.php
@@ -51,7 +51,7 @@ public function parse($filename) {
         throw new InfoParserException('Missing required keys (' . implode(', ', $missing_keys) . ') in ' . $filename);
       }
       if (!isset($parsed_info['core_version_requirement'])) {
-        if (str_starts_with($filename, 'core/') || str_starts_with($filename, $this->root . '/core/')) {
+        if (str_starts_with($filename, 'core/') || str_starts_with($filename, $this->root . DIRECTORY_SEPARATOR . 'core/')) {
           // Core extensions do not need to specify core compatibility: they are
           // by definition compatible so a sensible default is used. Core
           // modules are allowed to provide these for testing purposes.
diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php
index 141269e043..49971b7ad3 100644
--- a/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php
+++ b/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php
@@ -69,31 +69,6 @@ protected function setUp(): void {
     $this->drupalLogin($user);
   }
 
-  /**
-   * Tests that disabled media items don't capture focus on page load.
-   */
-  public function testFocusNotAppliedWithoutSelectionChange() {
-    // Create a node with the maximum number of values for the field_twin_media
-    // field.
-    $node = $this->drupalCreateNode([
-      'type' => 'basic_page',
-      'field_twin_media' => [
-        $this->mediaItems['Horse'],
-        $this->mediaItems['Bear'],
-      ],
-    ]);
-    $this->drupalGet($node->toUrl('edit-form'));
-    $open_button = $this->assertElementExistsAfterWait('css', '.js-media-library-open-button[name^="field_twin_media"]');
-    // The open button should be disabled, but not have the
-    // 'data-disabled-focus' attribute.
-    $this->assertFalse($open_button->hasAttribute('data-disabled-focus'));
-    $this->assertTrue($open_button->hasAttribute('disabled'));
-    // The button should be disabled.
-    $this->assertJsCondition('jQuery("#field_twin_media-media-library-wrapper .js-media-library-open-button").is(":disabled")');
-    // The button should not have focus.
-    $this->assertJsCondition('jQuery("#field_twin_media-media-library-wrapper .js-media-library-open-button").not(":focus")');
-  }
-
   /**
    * Tests that the Media library's widget works as expected.
    */
@@ -207,12 +182,12 @@ public function testWidget() {
     // Assert the announcements for media type navigation in the media library.
     $this->openMediaLibraryForField('field_unlimited_media');
     $this->switchToMediaType('Three');
-    $this->assertNotEmpty($assert_session->waitForText('Showing Type Three media.'));
+    $this->assertTrue($assert_session->waitForText('Showing Type Three media.'));
     $this->switchToMediaType('One');
-    $this->assertNotEmpty($assert_session->waitForText('Showing Type One media.'));
+    $this->assertTrue($assert_session->waitForText('Showing Type One media.'));
     // Assert the links can be triggered by via the spacebar.
     $assert_session->elementExists('named', ['link', 'Type Three'])->keyPress(32);
-    $this->waitForText('Showing Type Three media.');
+    $this->assertTrue($assert_session->waitForText('Showing Type Three media.'));
     $assert_session->elementExists('css', '.ui-dialog-titlebar-close')->click();
 
     // Assert media is only visible on the tab for the related media type.
@@ -233,13 +208,12 @@ public function testWidget() {
     $session = $this->getSession();
     $session->getPage()->fillField('Name', 'Dog');
     $session->getPage()->pressButton('Apply filters');
-    $this->waitForText('Dog');
-    $this->markTestSkipped("Skipped temporarily for random fails.");
-    $this->waitForNoText('Bear');
+    $this->assertTrue($assert_session->waitForText('Dog'));
+    $this->assertFalse($assert_session->waitForText('Bear'));
     $session->getPage()->fillField('Name', '');
     $session->getPage()->pressButton('Apply filters');
-    $this->waitForText('Dog');
-    $this->waitForText('Bear');
+    $this->assertTrue($assert_session->waitForText('Dog'));
+    $this->assertTrue($assert_session->waitForText('Bear'));
     $assert_session->elementExists('css', '.ui-dialog-titlebar-close')->click();
 
     // Assert adding a single media item and removing it.
@@ -258,7 +232,7 @@ public function testWidget() {
     $button = $assert_session->buttonExists('Remove', $wrapper);
     $this->assertSame('Remove Dog', $button->getAttribute('aria-label'));
     $button->press();
-    $this->waitForText('Dog has been removed.');
+    $this->assertTrue($assert_session->waitForText('Dog has been removed.'));
     // Assert the focus is set back on the open button of the media field.
     $this->assertJsCondition('jQuery("#field_twin_media-media-library-wrapper .js-media-library-open-button").is(":focus")');
 
@@ -284,9 +258,9 @@ public function testWidget() {
     $assert_session->hiddenFieldValueEquals('field_twin_media[selection][0][target_id]', 4);
     $assert_session->hiddenFieldValueEquals('field_twin_media[selection][1][target_id]', 4);
     $wrapper->pressButton('Remove');
-    $this->waitForText('Dog has been removed.');
+    $this->assertTrue($assert_session->waitForText('Dog has been removed.'));
     $wrapper->pressButton('Remove');
-    $this->waitForText('Dog has been removed.');
+    $this->assertTrue($assert_session->waitForText('Dog has been removed.'));
     $result = $wrapper->waitFor(10, function ($wrapper) {
       /** @var \Behat\Mink\Element\NodeElement $wrapper */
       return $wrapper->findButton('Remove') == NULL;
@@ -368,7 +342,7 @@ public function testWidget() {
     $button = $assert_session->buttonExists('Remove', $wrapper);
     $this->assertSame('Remove Cat', $button->getAttribute('aria-label'));
     $button->press();
-    $this->waitForText('Cat has been removed.');
+    $this->assertTrue($assert_session->waitForText('Cat has been removed.'));
     // Assert the focus is set to the wrapper of the other selected item.
     $this->assertJsCondition('jQuery("#field_twin_media-media-library-wrapper [data-media-library-item-delta]").is(":focus")');
     $assert_session->elementTextNotContains('css', '#field_twin_media-media-library-wrapper', 'Cat');
@@ -454,7 +428,7 @@ public function testWidget() {
     $this->selectMediaItem(2);
     $this->selectMediaItem(3);
     $this->pressInsertSelected('Added 4 media items.');
-    $this->waitForText('Dog');
+    $this->assertTrue($assert_session->waitForText('Dog'));
     $assert_session->pageTextContains('Cat');
     $assert_session->pageTextContains('Bear');
     $assert_session->pageTextContains('Horse');
@@ -469,98 +443,6 @@ public function testWidget() {
     $assert_session->pageTextNotContains('Snake');
   }
 
-  /**
-   * Tests saving a required media library field.
-   */
-  public function testRequiredMediaField() {
-    $assert_session = $this->assertSession();
-    $page = $this->getSession()->getPage();
-
-    // Make field_unlimited_media required.
-    $field_config = FieldConfig::loadByName('node', 'basic_page', 'field_unlimited_media');
-    $field_config->setRequired(TRUE)->save();
-
-    $this->drupalGet('node/add/basic_page');
-
-    $page->fillField('Title', 'My page');
-    $page->pressButton('Save');
-
-    // Check that a clear error message is shown.
-    $assert_session->pageTextNotContains('This value should not be null.');
-    $assert_session->pageTextContains(sprintf('%s field is required.', $field_config->label()));
-
-    // Open the media library, select an item and save the node.
-    $this->openMediaLibraryForField('field_unlimited_media');
-    $this->selectMediaItem(0);
-    $this->pressInsertSelected('Added one media item.');
-    $page->pressButton('Save');
-
-    // Confirm that the node was created.
-    $this->assertSession()->pageTextContains('Basic page My page has been created.');
-  }
-
-  /**
-   * Tests that changed order is maintained after removing a selection.
-   */
-  public function testRemoveAfterReordering(): void {
-    $assert_session = $this->assertSession();
-    $page = $this->getSession()->getPage();
-
-    $this->drupalGet('node/add/basic_page');
-    $page->fillField('Title', 'My page');
-
-    $this->openMediaLibraryForField('field_unlimited_media');
-    $page->checkField('Select Dog');
-    $page->checkField('Select Cat');
-    $page->checkField('Select Bear');
-    // Order: Dog - Cat - Bear.
-    $this->pressInsertSelected('Added 3 media items.');
-
-    // Move first item (Dog) to the end.
-    // Order: Cat - Bear - Dog.
-    $this->sortableAfter('[data-media-library-item-delta="0"]', '[data-media-library-item-delta="2"]', '.js-media-library-selection');
-
-    $wrapper = $assert_session->elementExists('css', '.field--name-field-unlimited-media');
-    // Remove second item (Bear).
-    // Order: Cat - Dog.
-    $wrapper->find('css', "[aria-label='Remove Bear']")->press();
-    $this->waitForText('Bear has been removed.');
-    $page->pressButton('Save');
-
-    $assert_session->elementTextContains('css', '.field--name-field-unlimited-media > .field__items > .field__item:last-child', 'Dog');
-  }
-
-  /**
-   * Tests that order is correct after re-order and adding another item.
-   */
-  public function testAddAfterReordering(): void {
-    $assert_session = $this->assertSession();
-    $page = $this->getSession()->getPage();
-
-    $this->drupalGet('node/add/basic_page');
-    $page->fillField('Title', 'My page');
-
-    $this->openMediaLibraryForField('field_unlimited_media');
-    $page->checkField('Select Dog');
-    $page->checkField('Select Cat');
-    // Order: Dog - Cat.
-    $this->pressInsertSelected('Added 2 media items.');
-
-    // Change positions.
-    // Order: Cat - Dog.
-    $this->sortableAfter('[data-media-library-item-delta="0"]', '[data-media-library-item-delta="1"]', '.js-media-library-selection');
-
-    $this->openMediaLibraryForField('field_unlimited_media');
-    $this->selectMediaItem(2);
-    // Order: Cat - Dog - Bear.
-    $this->pressInsertSelected('Added one media item.');
-
-    $page->pressButton('Save');
-
-    $assert_session->elementTextContains('css', '.field--name-field-unlimited-media > .field__items > .field__item:first-child', 'Cat');
-    $assert_session->elementTextContains('css', '.field--name-field-unlimited-media > .field__items > .field__item:last-child', 'Bear');
-  }
-
   /**
    * {@inheritdoc}
    */
@@ -581,58 +463,4 @@ protected function sortableUpdate($item, $from, $to = NULL) {
     $this->getSession()->executeScript($script);
   }
 
-  /**
-   * Tests the preview displayed by the field widget.
-   */
-  public function testWidgetPreview() {
-    $assert_session = $this->assertSession();
-    $page = $this->getSession()->getPage();
-
-    $node = $this->drupalCreateNode([
-      'type' => 'basic_page',
-      'field_unlimited_media' => [
-        $this->mediaItems['Horse'],
-      ],
-    ]);
-    $media_id = $this->mediaItems['Horse']->id();
-
-    // Assert that preview is present for current user, who can view media.
-    $this->drupalGet($node->toUrl('edit-form'));
-    $assert_session->elementTextContains('css', '[data-drupal-selector="edit-field-unlimited-media-selection-0"]', 'Horse');
-    $remove_button = $page->find('css', '[data-drupal-selector="edit-field-unlimited-media-selection-0-remove-button"]');
-    $this->assertSame('Remove Horse', $remove_button->getAttribute('aria-label'));
-    $assert_session->pageTextNotContains('You do not have permission to view media item');
-    $remove_button->press();
-    $this->waitForText("Removing Horse.");
-    $this->waitForText("Horse has been removed.");
-    // Logout without saving.
-    $this->drupalLogout();
-
-    // Create a user who can edit content but not view media.
-    // Must remove permission from authenticated role first, otherwise the new
-    // user will inherit that permission.
-    $role = Role::load(RoleInterface::AUTHENTICATED_ID);
-    $role->revokePermission('view media');
-    $role->save();
-    $non_media_editor = $this->drupalCreateUser([
-      'access content',
-      'create basic_page content',
-      'edit any basic_page content',
-    ]);
-    $this->drupalLogin($non_media_editor);
-
-    // Assert that preview does not reveal media name.
-    $this->drupalGet($node->toUrl('edit-form'));
-    // There should be no preview name.
-    $assert_session->elementTextNotContains('css', '[data-drupal-selector="edit-field-unlimited-media-selection-0"]', 'Horse');
-    // The remove button should have a generic message.
-    $remove_button = $page->find('css', '[data-drupal-selector="edit-field-unlimited-media-selection-0-remove-button"]');
-    $this->assertSame('Remove media', $remove_button->getAttribute('aria-label'));
-    $assert_session->pageTextContains("You do not have permission to view media item $media_id.");
-    // Confirm ajax text does not reveal media name.
-    $remove_button->press();
-    $this->waitForText("Removing media.");
-    $this->waitForText("Media has been removed.");
-  }
-
 }
diff --git a/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php b/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php
index 9ef1913ab6..4c9729b13c 100644
--- a/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php
+++ b/core/tests/Drupal/Tests/BrowserHtmlDebugTrait.php
@@ -114,13 +114,13 @@ protected function getHtmlOutputHeaders() {
    *
    * @see \Drupal\Tests\Listeners\VerbosePrinter::printResult()
    */
-  protected function htmlOutput($message = NULL) {
+  protected function htmlOutput($message = NULL, $name = NULL) {
     if (!$this->htmlOutputEnabled) {
       return;
     }
     $message = $message ?: $this->getSession()->getPage()->getContent();
     $message = '<hr />ID #' . $this->htmlOutputCounter . ' (<a href="' . $this->htmlOutputClassName . '-' . ($this->htmlOutputCounter - 1) . '-' . $this->htmlOutputTestId . '.html">Previous</a> | <a href="' . $this->htmlOutputClassName . '-' . ($this->htmlOutputCounter + 1) . '-' . $this->htmlOutputTestId . '.html">Next</a>)<hr />' . $message;
-    $html_output_filename = $this->htmlOutputClassName . '-' . $this->htmlOutputCounter . '-' . $this->htmlOutputTestId . '.html';
+    $html_output_filename = $name ?: $this->htmlOutputClassName . '-' . $this->htmlOutputCounter . '-' . $this->htmlOutputTestId . '.html';    file_put_contents($this->htmlOutputDirectory . '/' . $html_output_filename, $message);
     file_put_contents($this->htmlOutputDirectory . '/' . $html_output_filename, $message);
     file_put_contents($this->htmlOutputCounterStorage, $this->htmlOutputCounter++);
     // Do not use the file_url_generator service as the module_handler service
