Random test failure in MediaStandardProfileTest::testMediaSources

Created on 3 April 2019, over 5 years ago
Updated 24 April 2023, over 1 year ago

Problem/Motivation

Some examples of random test failure by MediaStandardProfileTest::testMediaSources

Test the standard profile configuration for media type 'remote_video'.
https://www.drupal.org/pift-ci-job/1250132 β†’
https://www.drupal.org/pift-ci-job/1210218 β†’

There was 1 failure:

1) Drupal\Tests\media\FunctionalJavascript\MediaStandardProfileTest::testMediaSources
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'Drupal Rap Video - Schipulcon09'
+'example_2.jpeg'

/var/www/html/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php:400
/var/www/html/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php:80

Test the standard profile configuration for media type 'image'.
https://www.drupal.org/pift-ci-job/1209481 β†’

There was 1 failure:

1) Drupal\Tests\media\FunctionalJavascript\MediaStandardProfileTest::testMediaSources
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'example_2.jpeg'
+'example_1.jpeg'

/var/www/html/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php:249
/var/www/html/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php:79

Proposed resolution

Add waitForLink($locator, $timeout = 10000) after pressButton('Save').

     $page->pressButton('Save');
+    $result = $assert_session->waitForLink('Add media');
+    $this->assertNotEmpty($result);
+    $assert_session->addressEquals('admin/content/media');

Remaining tasks

None

πŸ› Bug report
Status

Fixed

Version

10.1 ✨

Component
MediaΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡΅πŸ‡±Poland Krzysztof DomaΕ„ski Poland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024