Issue #3315753 by alexpott: Random fail in Drupal\Tests\media_library\FunctionalJavascript\WidgetUploadTest

(cherry picked from commit dcc4424336)
merge-requests/2710/merge
Alex Pott 2022-10-17 19:46:12 +01:00
parent ab042574c6
commit cb8db5e3e0
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
1 changed files with 6 additions and 2 deletions

View File

@ -141,8 +141,10 @@ class WidgetUploadTest extends MediaLibraryTestBase {
$this->waitForText($png_image->filename);
// Remove the item.
$assert_session->elementTextContains('css', '.field--name-field-twin-media', $png_image->filename);
$assert_session->elementExists('css', '.field--name-field-twin-media')->pressButton('Remove');
$this->waitForNoText($png_image->filename);
$this->waitForElementTextContains('#drupal-live-announce', $png_image->filename . ' has been removed');
$assert_session->elementTextNotContains('css', '.field--name-field-twin-media', $png_image->filename);
$this->openMediaLibraryForField('field_twin_media');
$this->switchToMediaType('Three');
@ -478,8 +480,10 @@ class WidgetUploadTest extends MediaLibraryTestBase {
$this->waitForText($png_image->filename);
// Remove the item.
$assert_session->elementTextContains('css', '.field--name-field-twin-media', $png_image->filename);
$assert_session->elementExists('css', '.field--name-field-twin-media')->pressButton('Remove');
$this->waitForNoText($png_image->filename);
$this->waitForElementTextContains('#drupal-live-announce', $png_image->filename . ' has been removed');
$assert_session->elementTextNotContains('css', '.field--name-field-twin-media', $png_image->filename);
$this->openMediaLibraryForField('field_twin_media');
$this->switchToMediaType('Three');