From 9b71466ef15c1013a9b9e08e017290cd3ab73075 Mon Sep 17 00:00:00 2001 From: Michael Strelan <mstrelan@gmail.com> Date: Wed, 2 Apr 2025 11:58:55 +1000 Subject: [PATCH] Skip tests earlier --- .../src/FunctionalJavascript/AlertsJsonFeedTest.php | 5 ++++- .../tests/src/Kernel/AnnounceFetcherTest.php | 3 +-- .../src/FunctionalJavascript/MediaLibraryTest.php | 7 ++++--- .../src/FunctionalJavascript/LayoutBuilderUiTest.php | 5 ++++- .../src/FunctionalJavascript/MoveBlockFormTest.php | 3 ++- .../SettingsTrayBlockFormTest.php | 5 ++++- .../tests/src/Functional/Module/DependencyTest.php | 11 ++++++++++- .../system/tests/src/Functional/System/ThemeTest.php | 5 ++++- .../src/Functional/UpdateSystem/UpdateScriptTest.php | 4 +++- .../FunctionalJavascriptTests/Ajax/AjaxTest.php | 11 ++++++++++- .../Core/Field/TimestampFormatterWithTimeDiffTest.php | 5 ++++- 11 files changed, 50 insertions(+), 14 deletions(-) diff --git a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php index a4b09d7feaee..39edf53e90c1 100644 --- a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php +++ b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php @@ -41,6 +41,10 @@ class AlertsJsonFeedTest extends OffCanvasTestBase { * {@inheritdoc} */ public function setUp():void { + if ($this->name() === 'testAnnounceFeedUpdatedAndRemoved') { + $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322'); + } + parent::setUp(); $this->user = $this->drupalCreateUser( @@ -57,7 +61,6 @@ public function setUp():void { * Check the status of the announcements when the feed is updated and removed. */ public function testAnnounceFeedUpdatedAndRemoved(): void { - $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322'); $this->drupalLogin($this->user); $this->drupalGet('<front>'); $this->clickLink('Announcements'); diff --git a/core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php b/core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php index d2c70ae8d760..0d144f0878f9 100644 --- a/core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php +++ b/core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php @@ -17,6 +17,7 @@ class AnnounceFetcherTest extends AnnounceTestBase { * {@inheritdoc} */ protected function setUp(): void { + $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322'); parent::setUp(); $this->installConfig(['announcements_feed']); } @@ -31,7 +32,6 @@ protected function setUp(): void { * @dataProvider providerShowAnnouncements */ public function testShowAnnouncements(array $feed_item): void { - $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322'); $this->setFeedItems([$feed_item]); $feeds = $this->fetchFeedItems(); $this->assertCount(1, $feeds); @@ -45,7 +45,6 @@ public function testShowAnnouncements(array $feed_item): void { * Tests feed fields. */ public function testFeedFields(): void { - $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322'); $feed_item_1 = [ 'id' => '1001', 'content_html' => 'Test teaser 1', diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php index ccf189d484a2..c95baf47e0c4 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php @@ -62,6 +62,10 @@ class MediaLibraryTest extends WebDriverTestBase { * {@inheritdoc} */ protected function setUp(): void { + if ($this->name() === 'testButton') { + $this->markTestSkipped('Skipped due to frequent random test failures. See https://www.drupal.org/i/3351597'); + } + parent::setUp(); FilterFormat::create([ @@ -156,9 +160,6 @@ function (ConstraintViolationInterface $v) { * Tests using drupalMedia button to embed media into CKEditor 5. */ public function testButton(): void { - // Skipped due to frequent random test failures. - // @todo Fix this and stop skipping it at https://www.drupal.org/i/3351597. - $this->markTestSkipped(); $media_preview_selector = '.ck-content .ck-widget.drupal-media .media'; $this->drupalGet('/node/add/blog'); $this->waitForEditor(); diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php index 46f15a177c2c..a9205d9f0dc3 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php @@ -48,6 +48,10 @@ class LayoutBuilderUiTest extends WebDriverTestBase { * {@inheritdoc} */ protected function setUp(): void { + if ($this->name() === 'testAddHighlights') { + $this->markTestSkipped("Skipped temporarily for random fails."); + } + parent::setUp(); $this->createContentType(['type' => 'bundle_with_section_field']); @@ -299,7 +303,6 @@ private function assertHighlightedElement(string $selector): void { * Waits for the dialog to close and confirms no highlights are present. */ private function assertHighlightNotExists(): void { - $this->markTestSkipped("Skipped temporarily for random fails."); $assert_session = $this->assertSession(); $assert_session->assertNoElementAfterWait('css', '#drupal-off-canvas'); diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php index ba11617ffae7..df748df0e080 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php @@ -39,6 +39,8 @@ class MoveBlockFormTest extends WebDriverTestBase { * {@inheritdoc} */ protected function setUp(): void { + $this->markTestSkipped("Skipped temporarily for random fails."); + parent::setUp(); $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); @@ -66,7 +68,6 @@ protected function setUp(): void { '.block-extra-field-blocknodebundle-with-section-fieldlinks', '.block-field-blocknodebundle-with-section-fieldbody', ]; - $this->markTestSkipped("Skipped temporarily for random fails."); $this->assertRegionBlocksOrder(0, 'content', $expected_block_order); // Add a top section using the Two column layout. diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php index 85eb9eadcf1d..26c24424f9d1 100644 --- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php +++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php @@ -34,6 +34,10 @@ class SettingsTrayBlockFormTest extends SettingsTrayTestBase { * {@inheritdoc} */ protected function setUp(): void { + if ($this->name() === 'testEditModeEnableDisable') { + $this->markTestSkipped("Skipped due to frequent random test failures. See https://www.drupal.org/project/drupal/issues/3317520"); + } + parent::setUp(); $user = $this->createUser([ @@ -231,7 +235,6 @@ public function getBlockTests() { * Tests enabling and disabling Edit Mode. */ public function testEditModeEnableDisable(): void { - $this->markTestSkipped("Skipped due to frequent random test failures. See https://www.drupal.org/project/drupal/issues/3317520"); foreach (static::getTestThemes() as $theme) { $this->enableTheme($theme); $block = $this->placeBlock('system_powered_by_block'); diff --git a/core/modules/system/tests/src/Functional/Module/DependencyTest.php b/core/modules/system/tests/src/Functional/Module/DependencyTest.php index ef30c4f713ff..7f2d218388a8 100644 --- a/core/modules/system/tests/src/Functional/Module/DependencyTest.php +++ b/core/modules/system/tests/src/Functional/Module/DependencyTest.php @@ -19,6 +19,16 @@ class DependencyTest extends ModuleTestBase { */ protected $defaultTheme = 'stark'; + /** + * {@inheritdoc} + */ + protected function setUp(): void { + if ($this->name() === 'testCoreCompatibility') { + $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322'); + } + parent::setUp(); + } + /** * Checks functionality of project namespaces for dependencies. */ @@ -173,7 +183,6 @@ public function testIncompatiblePhpVersionDependency(): void { * Tests enabling modules with different core version specifications. */ public function testCoreCompatibility(): void { - $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322'); $assert_session = $this->assertSession(); // Test incompatible 'core_version_requirement'. diff --git a/core/modules/system/tests/src/Functional/System/ThemeTest.php b/core/modules/system/tests/src/Functional/System/ThemeTest.php index a5fbadec916a..2b91b132371c 100644 --- a/core/modules/system/tests/src/Functional/System/ThemeTest.php +++ b/core/modules/system/tests/src/Functional/System/ThemeTest.php @@ -49,6 +49,10 @@ class ThemeTest extends BrowserTestBase { * {@inheritdoc} */ protected function setUp(): void { + if ($this->name() === 'testInstallAndSetAsDefault') { + $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322'); + } + parent::setUp(); $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']); @@ -527,7 +531,6 @@ public function testUninstallingThemes(): void { * Tests installing a theme and setting it as default. */ public function testInstallAndSetAsDefault(): void { - $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322'); $themes = [ 'olivero' => 'Olivero', 'test_core_semver' => 'Theme test with semver core version', diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php index 210e41e840d5..f0f78b23c99c 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php @@ -64,6 +64,9 @@ class UpdateScriptTest extends BrowserTestBase { * {@inheritdoc} */ protected function setUp(): void { + if ($this->name() === 'testMissingExtension') { + $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322'); + } parent::setUp(); $this->updateUrl = Url::fromRoute('system.db_update'); $this->statusReportUrl = Url::fromRoute('system.status'); @@ -350,7 +353,6 @@ public static function providerExtensionCompatibilityChange() { * @dataProvider providerMissingExtension */ public function testMissingExtension(array $core, array $contrib): void { - $this->markTestSkipped('Skipped due to major version-specific logic. See https://www.drupal.org/project/drupal/issues/3359322'); $this->drupalLogin( $this->drupalCreateUser( [ diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php index 3d056401a2b8..03bd477123c1 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php @@ -24,6 +24,16 @@ class AjaxTest extends WebDriverTestBase { */ protected $defaultTheme = 'stark'; + /** + * {@inheritdoc} + */ + protected function setUp(): void { + if ($this->name() === 'testAjaxFocus') { + $this->markTestSkipped("Skipped due to frequent random test failures. See https://www.drupal.org/project/drupal/issues/3396536"); + } + parent::setUp(); + } + public function testAjaxWithAdminRoute(): void { \Drupal::service('theme_installer')->install(['stable9', 'claro']); $theme_config = \Drupal::configFactory()->getEditable('system.theme'); @@ -301,7 +311,6 @@ public function testUiAjaxException(): void { * Tests ajax focus handling. */ public function testAjaxFocus(): void { - $this->markTestSkipped("Skipped due to frequent random test failures. See https://www.drupal.org/project/drupal/issues/3396536"); $this->drupalGet('/ajax_forms_test_get_form'); $this->assertNotNull($select = $this->assertSession()->elementExists('css', '#edit-select')); diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffTest.php index 92ce91803294..53b2c5dcb7a5 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Core/Field/TimestampFormatterWithTimeDiffTest.php @@ -39,6 +39,10 @@ class TimestampFormatterWithTimeDiffTest extends WebDriverTestBase { * {@inheritdoc} */ protected function setUp(): void { + if ($this->name() === 'testNoRefreshInterval') { + $this->markTestSkipped("Skipped due to frequent random test failures. See https://www.drupal.org/project/drupal/issues/3400150"); + } + parent::setUp(); FieldStorageConfig::create([ @@ -138,7 +142,6 @@ public function testTimestampFormatterWithTimeDiff(): void { * Tests the 'timestamp' formatter without refresh interval. */ public function testNoRefreshInterval(): void { - $this->markTestSkipped("Skipped due to frequent random test failures. See https://www.drupal.org/project/drupal/issues/3400150"); // Set the refresh interval to zero, meaning "no refresh". $display = EntityViewDisplay::load('entity_test.entity_test.default'); $component = $display->getComponent('time_field'); -- GitLab