Problem/Motivation
ResponsiveImageFieldUiTest::testResponsiveImageFormatterUi() still contains a race condition and will randomly fail.
Background
This is a followup to #3565218: [random test failure] ResponsiveImageFieldUiTest::testResponsiveImageFormatterUi(), which fixed another flaky assertion in the same test.
Steps to reproduce
https://git.drupalcode.org/issue/drupal-3008172/-/jobs/13531022
Proposed resolution
--- a/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php
+++ b/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php
@@ -88,7 +88,8 @@
$field_image_type = $page->findField('fields[field_image][type]');
$field_image_type->setValue('responsive_image');
- $summary_text = $assert_session->waitForElement('xpath', $this->cssSelectToXpath('#field-image .ajax-new-content .field-plugin-summary'));
+ $summary_text = $assert_session->waitForElementVisible('css', '#field-image .ajax-new-content .field-plugin-summary');
+ $this->assertNotNull($summary_text);
$this->assertEquals('Select a responsive image style. Loading attribute: lazy', $summary_text->getText());
$page->pressButton('Save');
Remaining tasks
Review.
User interface changes
None.
Introduced terminology
None.
API changes
None.
Data model changes
None.
Release notes snippet
n/a
Comments
Comment #3
pancho