Loading core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php +28 −27 Changes for core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php: 28 added lines, 27 removed lines. Original line number Diff line number Diff line Loading @@ -158,12 +158,13 @@ protected function audioTest(): void { $media = \Drupal::entityTypeManager()->getStorage('media')->loadUnchanged($audio_media_id); $this->assertSame($test_filename, $media->label()); // Here we expect to see only the linked filename. Assert the audio field exists. $assert_session->elementsCount('css', '.field--name-field-media-audio-file', 1); // Here we expect to see only the linked filename. Assert the audio element // exists. $assert_session->elementsCount('css', '#block-default-admin-content audio', 1); // Assert the audio file is present inside the media element and that its // src attribute matches the audio file. $audio_element = $assert_session->elementExists('css', '.field--name-field-media-audio-file audio > source'); $audio_element = $assert_session->elementExists('css', '#block-default-admin-content audio > source'); /** @var \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator */ $file_url_generator = \Drupal::service('file_url_generator'); $expected_audio_src = $file_url_generator->generate(\Drupal::token()->replace('public://[date:custom:Y]-[date:custom:m]/' . $test_filename))->toString(); Loading @@ -186,13 +187,13 @@ protected function audioTest(): void { $media = \Drupal::entityTypeManager()->getStorage('media')->loadUnchanged($audio_media_id); $this->assertSame($test_filename_updated, $media->label()); // Again we expect to see only the linked filename. Assert only one element // in the content region. $assert_session->elementsCount('css', '.field--name-field-media-audio-file', 1); // Again we expect to see only the linked filename. Assert only one audio // field in the content region. $assert_session->elementsCount('css', '#block-default-admin-content audio', 1); // Assert the audio file is present inside the media element and that its // src attribute matches the updated audio file. $audio_element = $assert_session->elementExists('css', '.field--name-field-media-audio-file audio > source'); $audio_element = $assert_session->elementExists('css', '#block-default-admin-content audio > source'); $expected_audio_src = $file_url_generator->generate(\Drupal::token()->replace('public://[date:custom:Y]-[date:custom:m]/' . $test_filename_updated))->toString(); $this->assertSame($expected_audio_src, $audio_element->getAttribute('src')); } Loading Loading @@ -247,19 +248,19 @@ protected function imageTest(): void { // Here we expect to see only the image, nothing else. Assert only one // element in the content region. $assert_session->elementsCount('css', '.field--name-field-media-image', 1); $assert_session->elementsCount('css', '#block-default-admin-content img', 1); // Assert the image element is present inside the media element and that its // src attribute uses the large image style, the label is visually hidden, // and there is no link to the image file. $image_element = $assert_session->elementExists('css', '.field--name-field-media-image img'); $image_element = $assert_session->elementExists('css', '#block-default-admin-content img'); /** @var \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator */ $file_url_generator = \Drupal::service('file_url_generator'); $expected_image_src = $file_url_generator->generate(\Drupal::token()->replace('public://styles/large/public/[date:custom:Y]-[date:custom:m]/' . $image_media_name))->toString(); $this->assertStringContainsString($expected_image_src, $image_element->getAttribute('src')); $assert_session->elementExists('css', '.field--name-field-media-image .field__label.visually-hidden'); $assert_session->elementNotExists('css', '.field--name-field-media-image a'); $assert_session->elementExists('css', '#block-default-admin-content div.visually-hidden'); $assert_session->elementNotExists('css', '#block-default-admin-content img a'); // Assert the media name is updated through the field mapping when changing // the source field. Loading @@ -282,16 +283,16 @@ protected function imageTest(): void { // Again we expect to see only the image, nothing else. Assert only one // element in the content region. $assert_session->elementsCount('css', '.field--name-field-media-image', 1); $assert_session->elementsCount('css', '#block-default-admin-content img', 1); // Assert the image element is present inside the media element and that its // src attribute uses the large image style, the label is visually hidden, // and there is no link to the image file. $image_element = $assert_session->elementExists('css', '.field--name-field-media-image img'); $image_element = $assert_session->elementExists('css', '#block-default-admin-content img'); $expected_image_src = $file_url_generator->generate(\Drupal::token()->replace('public://styles/large/public/[date:custom:Y]-[date:custom:m]/' . $image_media_name_updated))->toString(); $this->assertStringContainsString($expected_image_src, $image_element->getAttribute('src')); $assert_session->elementExists('css', '.field--name-field-media-image .field__label.visually-hidden'); $assert_session->elementNotExists('css', '.field--name-field-media-image a'); $assert_session->elementExists('css', '#block-default-admin-content div.visually-hidden'); $assert_session->elementNotExists('css', '#block-default-admin-content img a'); } /** Loading Loading @@ -350,11 +351,11 @@ protected function documentTest(): void { // Here we expect to see only the linked filename. Assert only one element // in the content region. $assert_session->elementsCount('css', '.field--name-field-media-document', 1); $assert_session->elementsCount('css', '#block-default-admin-content span.file', 1); // Assert the file link is present in the media element and its text matches // the filename. $link_element = $assert_session->elementExists('css', '.field--name-field-media-document a'); $link_element = $assert_session->elementExists('css', '#block-default-admin-content span.file a'); $this->assertSame($test_filename, $link_element->getText()); // Assert the media name is updated through the field mapping when changing Loading @@ -376,11 +377,11 @@ protected function documentTest(): void { // Again we expect to see only the linked filename. Assert only one element // in the content region. $assert_session->elementsCount('css', '.field--name-field-media-document', 1); $assert_session->elementsCount('css', '#block-default-admin-content span.file', 1); // Assert the file link is present in the media element and its text matches // the updated filename. $link_element = $assert_session->elementExists('css', '.field--name-field-media-document a'); $link_element = $assert_session->elementExists('css', '#block-default-admin-content span.file a'); $this->assertSame($test_filename_updated, $link_element->getText()); } Loading Loading @@ -438,11 +439,11 @@ protected function remoteVideoTest(): void { // Here we expect to see only the video iframe. Assert only one element in // the content region. $assert_session->elementsCount('css', '.field--name-field-media-oembed-video', 1); $assert_session->elementsCount('css', '#block-default-admin-content iframe', 1); // Assert the iframe is present in the media element and its src attribute // matches the URL and query parameters. $iframe_url = $assert_session->elementExists('css', '.field--name-field-media-oembed-video iframe')->getAttribute('src'); $iframe_url = $assert_session->elementExists('css', '#block-default-admin-content iframe')->getAttribute('src'); $iframe_url = parse_url($iframe_url); $this->assertStringEndsWith('/media/oembed', $iframe_url['path']); $this->assertNotEmpty($iframe_url['query']); Loading @@ -465,11 +466,11 @@ protected function remoteVideoTest(): void { // Again we expect to see only the video iframe. Assert only one element in // the content region. $assert_session->elementsCount('css', '.field--name-field-media-oembed-video', 1); $assert_session->elementsCount('css', '#block-default-admin-content iframe', 1); // Assert the iframe is present in the media element and its src attribute // matches the updated URL and query parameters. $iframe_url = $assert_session->elementExists('css', '.field--name-field-media-oembed-video iframe')->getAttribute('src'); $iframe_url = $assert_session->elementExists('css', '#block-default-admin-content iframe')->getAttribute('src'); $iframe_url = parse_url($iframe_url); $this->assertStringEndsWith('/media/oembed', $iframe_url['path']); $this->assertNotEmpty($iframe_url['query']); Loading Loading @@ -535,11 +536,11 @@ protected function videoTest(): void { // Here we expect to see only the linked filename. Assert only one element // in the content region. $assert_session->elementsCount('css', '.field--name-field-media-video-file', 1); $assert_session->elementsCount('css', '#block-default-admin-content video', 1); // Assert the video element is present inside the media element and that its // src attribute matches the video file. $video_element = $assert_session->elementExists('css', '.field--name-field-media-video-file video > source'); $video_element = $assert_session->elementExists('css', '#block-default-admin-content video > source'); /** @var \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator */ $file_url_generator = \Drupal::service('file_url_generator'); $expected_video_src = $file_url_generator->generate(\Drupal::token()->replace('public://[date:custom:Y]-[date:custom:m]/' . $test_filename))->toString(); Loading @@ -564,11 +565,11 @@ protected function videoTest(): void { // Again we expect to see only the linked filename. Assert only one element // in the content region. $assert_session->elementsCount('css', '.field--name-field-media-video-file', 1); $assert_session->elementsCount('css', '#block-default-admin-content video', 1); // Assert the video element is present inside the media element and that its // src attribute matches the updated video file. $video_element = $assert_session->elementExists('css', '.field--name-field-media-video-file video > source'); $video_element = $assert_session->elementExists('css', '#block-default-admin-content video > source'); $expected_video_src = $file_url_generator->generate(\Drupal::token()->replace('public://[date:custom:Y]-[date:custom:m]/' . $test_filename_updated))->toString(); $this->assertSame($expected_video_src, $video_element->getAttribute('src')); } Loading core/modules/navigation/tests/src/Nightwatch/Tests/a11yTest.js +1 −1 Changes for core/modules/navigation/tests/src/Nightwatch/Tests/a11yTest.js: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ const navigationTest = { browser.drupalUninstall(); }, }; const testCases = [{ name: 'Claro page', path: '/user/1/edit' }]; const testCases = [{ name: 'Default Admin page', path: '/user/1/edit' }]; testCases.forEach((testCase) => { navigationTest[`Accessibility - Navigation Module - ${testCase.name}`] = ( Loading core/profiles/demo_umami/config/install/system.theme.yml +1 −1 Changes for core/profiles/demo_umami/config/install/system.theme.yml: 1 added line, 1 removed line. Original line number Diff line number Diff line admin: claro admin: default_admin default: umami core/profiles/demo_umami/demo_umami.info.yml +1 −1 Changes for core/profiles/demo_umami/demo_umami.info.yml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -41,6 +41,6 @@ install: - content_translation - announcements_feed themes: - claro - default_admin - umami keep_english: true core/profiles/demo_umami/tests/src/FunctionalJavascript/MultipleRequestsPerformanceTestAssertions/umamiNodeAddEditor.yml +4 −4 Changes for core/profiles/demo_umami/tests/src/FunctionalJavascript/MultipleRequestsPerformanceTestAssertions/umamiNodeAddEditor.yml: 4 added lines, 4 removed lines. Original line number Diff line number Diff line ScriptCount: 20 ScriptBytes: 2963979 StylesheetCount: 26 StylesheetBytes: 637133 ScriptCount: 25 ScriptBytes: 3000540 StylesheetCount: 11 StylesheetBytes: 1088877 Loading
core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php +28 −27 Changes for core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php: 28 added lines, 27 removed lines. Original line number Diff line number Diff line Loading @@ -158,12 +158,13 @@ protected function audioTest(): void { $media = \Drupal::entityTypeManager()->getStorage('media')->loadUnchanged($audio_media_id); $this->assertSame($test_filename, $media->label()); // Here we expect to see only the linked filename. Assert the audio field exists. $assert_session->elementsCount('css', '.field--name-field-media-audio-file', 1); // Here we expect to see only the linked filename. Assert the audio element // exists. $assert_session->elementsCount('css', '#block-default-admin-content audio', 1); // Assert the audio file is present inside the media element and that its // src attribute matches the audio file. $audio_element = $assert_session->elementExists('css', '.field--name-field-media-audio-file audio > source'); $audio_element = $assert_session->elementExists('css', '#block-default-admin-content audio > source'); /** @var \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator */ $file_url_generator = \Drupal::service('file_url_generator'); $expected_audio_src = $file_url_generator->generate(\Drupal::token()->replace('public://[date:custom:Y]-[date:custom:m]/' . $test_filename))->toString(); Loading @@ -186,13 +187,13 @@ protected function audioTest(): void { $media = \Drupal::entityTypeManager()->getStorage('media')->loadUnchanged($audio_media_id); $this->assertSame($test_filename_updated, $media->label()); // Again we expect to see only the linked filename. Assert only one element // in the content region. $assert_session->elementsCount('css', '.field--name-field-media-audio-file', 1); // Again we expect to see only the linked filename. Assert only one audio // field in the content region. $assert_session->elementsCount('css', '#block-default-admin-content audio', 1); // Assert the audio file is present inside the media element and that its // src attribute matches the updated audio file. $audio_element = $assert_session->elementExists('css', '.field--name-field-media-audio-file audio > source'); $audio_element = $assert_session->elementExists('css', '#block-default-admin-content audio > source'); $expected_audio_src = $file_url_generator->generate(\Drupal::token()->replace('public://[date:custom:Y]-[date:custom:m]/' . $test_filename_updated))->toString(); $this->assertSame($expected_audio_src, $audio_element->getAttribute('src')); } Loading Loading @@ -247,19 +248,19 @@ protected function imageTest(): void { // Here we expect to see only the image, nothing else. Assert only one // element in the content region. $assert_session->elementsCount('css', '.field--name-field-media-image', 1); $assert_session->elementsCount('css', '#block-default-admin-content img', 1); // Assert the image element is present inside the media element and that its // src attribute uses the large image style, the label is visually hidden, // and there is no link to the image file. $image_element = $assert_session->elementExists('css', '.field--name-field-media-image img'); $image_element = $assert_session->elementExists('css', '#block-default-admin-content img'); /** @var \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator */ $file_url_generator = \Drupal::service('file_url_generator'); $expected_image_src = $file_url_generator->generate(\Drupal::token()->replace('public://styles/large/public/[date:custom:Y]-[date:custom:m]/' . $image_media_name))->toString(); $this->assertStringContainsString($expected_image_src, $image_element->getAttribute('src')); $assert_session->elementExists('css', '.field--name-field-media-image .field__label.visually-hidden'); $assert_session->elementNotExists('css', '.field--name-field-media-image a'); $assert_session->elementExists('css', '#block-default-admin-content div.visually-hidden'); $assert_session->elementNotExists('css', '#block-default-admin-content img a'); // Assert the media name is updated through the field mapping when changing // the source field. Loading @@ -282,16 +283,16 @@ protected function imageTest(): void { // Again we expect to see only the image, nothing else. Assert only one // element in the content region. $assert_session->elementsCount('css', '.field--name-field-media-image', 1); $assert_session->elementsCount('css', '#block-default-admin-content img', 1); // Assert the image element is present inside the media element and that its // src attribute uses the large image style, the label is visually hidden, // and there is no link to the image file. $image_element = $assert_session->elementExists('css', '.field--name-field-media-image img'); $image_element = $assert_session->elementExists('css', '#block-default-admin-content img'); $expected_image_src = $file_url_generator->generate(\Drupal::token()->replace('public://styles/large/public/[date:custom:Y]-[date:custom:m]/' . $image_media_name_updated))->toString(); $this->assertStringContainsString($expected_image_src, $image_element->getAttribute('src')); $assert_session->elementExists('css', '.field--name-field-media-image .field__label.visually-hidden'); $assert_session->elementNotExists('css', '.field--name-field-media-image a'); $assert_session->elementExists('css', '#block-default-admin-content div.visually-hidden'); $assert_session->elementNotExists('css', '#block-default-admin-content img a'); } /** Loading Loading @@ -350,11 +351,11 @@ protected function documentTest(): void { // Here we expect to see only the linked filename. Assert only one element // in the content region. $assert_session->elementsCount('css', '.field--name-field-media-document', 1); $assert_session->elementsCount('css', '#block-default-admin-content span.file', 1); // Assert the file link is present in the media element and its text matches // the filename. $link_element = $assert_session->elementExists('css', '.field--name-field-media-document a'); $link_element = $assert_session->elementExists('css', '#block-default-admin-content span.file a'); $this->assertSame($test_filename, $link_element->getText()); // Assert the media name is updated through the field mapping when changing Loading @@ -376,11 +377,11 @@ protected function documentTest(): void { // Again we expect to see only the linked filename. Assert only one element // in the content region. $assert_session->elementsCount('css', '.field--name-field-media-document', 1); $assert_session->elementsCount('css', '#block-default-admin-content span.file', 1); // Assert the file link is present in the media element and its text matches // the updated filename. $link_element = $assert_session->elementExists('css', '.field--name-field-media-document a'); $link_element = $assert_session->elementExists('css', '#block-default-admin-content span.file a'); $this->assertSame($test_filename_updated, $link_element->getText()); } Loading Loading @@ -438,11 +439,11 @@ protected function remoteVideoTest(): void { // Here we expect to see only the video iframe. Assert only one element in // the content region. $assert_session->elementsCount('css', '.field--name-field-media-oembed-video', 1); $assert_session->elementsCount('css', '#block-default-admin-content iframe', 1); // Assert the iframe is present in the media element and its src attribute // matches the URL and query parameters. $iframe_url = $assert_session->elementExists('css', '.field--name-field-media-oembed-video iframe')->getAttribute('src'); $iframe_url = $assert_session->elementExists('css', '#block-default-admin-content iframe')->getAttribute('src'); $iframe_url = parse_url($iframe_url); $this->assertStringEndsWith('/media/oembed', $iframe_url['path']); $this->assertNotEmpty($iframe_url['query']); Loading @@ -465,11 +466,11 @@ protected function remoteVideoTest(): void { // Again we expect to see only the video iframe. Assert only one element in // the content region. $assert_session->elementsCount('css', '.field--name-field-media-oembed-video', 1); $assert_session->elementsCount('css', '#block-default-admin-content iframe', 1); // Assert the iframe is present in the media element and its src attribute // matches the updated URL and query parameters. $iframe_url = $assert_session->elementExists('css', '.field--name-field-media-oembed-video iframe')->getAttribute('src'); $iframe_url = $assert_session->elementExists('css', '#block-default-admin-content iframe')->getAttribute('src'); $iframe_url = parse_url($iframe_url); $this->assertStringEndsWith('/media/oembed', $iframe_url['path']); $this->assertNotEmpty($iframe_url['query']); Loading Loading @@ -535,11 +536,11 @@ protected function videoTest(): void { // Here we expect to see only the linked filename. Assert only one element // in the content region. $assert_session->elementsCount('css', '.field--name-field-media-video-file', 1); $assert_session->elementsCount('css', '#block-default-admin-content video', 1); // Assert the video element is present inside the media element and that its // src attribute matches the video file. $video_element = $assert_session->elementExists('css', '.field--name-field-media-video-file video > source'); $video_element = $assert_session->elementExists('css', '#block-default-admin-content video > source'); /** @var \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator */ $file_url_generator = \Drupal::service('file_url_generator'); $expected_video_src = $file_url_generator->generate(\Drupal::token()->replace('public://[date:custom:Y]-[date:custom:m]/' . $test_filename))->toString(); Loading @@ -564,11 +565,11 @@ protected function videoTest(): void { // Again we expect to see only the linked filename. Assert only one element // in the content region. $assert_session->elementsCount('css', '.field--name-field-media-video-file', 1); $assert_session->elementsCount('css', '#block-default-admin-content video', 1); // Assert the video element is present inside the media element and that its // src attribute matches the updated video file. $video_element = $assert_session->elementExists('css', '.field--name-field-media-video-file video > source'); $video_element = $assert_session->elementExists('css', '#block-default-admin-content video > source'); $expected_video_src = $file_url_generator->generate(\Drupal::token()->replace('public://[date:custom:Y]-[date:custom:m]/' . $test_filename_updated))->toString(); $this->assertSame($expected_video_src, $video_element->getAttribute('src')); } Loading
core/modules/navigation/tests/src/Nightwatch/Tests/a11yTest.js +1 −1 Changes for core/modules/navigation/tests/src/Nightwatch/Tests/a11yTest.js: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ const navigationTest = { browser.drupalUninstall(); }, }; const testCases = [{ name: 'Claro page', path: '/user/1/edit' }]; const testCases = [{ name: 'Default Admin page', path: '/user/1/edit' }]; testCases.forEach((testCase) => { navigationTest[`Accessibility - Navigation Module - ${testCase.name}`] = ( Loading
core/profiles/demo_umami/config/install/system.theme.yml +1 −1 Changes for core/profiles/demo_umami/config/install/system.theme.yml: 1 added line, 1 removed line. Original line number Diff line number Diff line admin: claro admin: default_admin default: umami
core/profiles/demo_umami/demo_umami.info.yml +1 −1 Changes for core/profiles/demo_umami/demo_umami.info.yml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -41,6 +41,6 @@ install: - content_translation - announcements_feed themes: - claro - default_admin - umami keep_english: true
core/profiles/demo_umami/tests/src/FunctionalJavascript/MultipleRequestsPerformanceTestAssertions/umamiNodeAddEditor.yml +4 −4 Changes for core/profiles/demo_umami/tests/src/FunctionalJavascript/MultipleRequestsPerformanceTestAssertions/umamiNodeAddEditor.yml: 4 added lines, 4 removed lines. Original line number Diff line number Diff line ScriptCount: 20 ScriptBytes: 2963979 StylesheetCount: 26 StylesheetBytes: 637133 ScriptCount: 25 ScriptBytes: 3000540 StylesheetCount: 11 StylesheetBytes: 1088877