Skip to content
Snippets Groups Projects

Issues/3396669: has-error class not applied to media fields

Open AKHIL BABU requested to merge issue/drupal-3396669:3396669-has-error-2 into 11.x
5 files
+ 22
2
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -490,6 +490,10 @@ public function testRequiredMediaField(): void {
$assert_session->pageTextNotContains('This value should not be null.');
$assert_session->pageTextContains(sprintf('%s field is required.', $field_config->label()));
// Check if 'error' class has been added to media field.
$media_field = $assert_session->elementExists('css', '#field_unlimited_media-media-library-wrapper');
$this->assertTrue($media_field->hasClass('error'));
// Open the media library, select an item and save the node.
$this->openMediaLibraryForField('field_unlimited_media');
$this->selectMediaItem(0);
Loading