Commit 3898aa33 authored by Tom Keitel's avatar Tom Keitel
Browse files

Issue #3281813 by hctom: Check/fix deprecation notices

parent 5a3f56f6
Loading
Loading
Loading
Loading
+8 −0
Changes for tests/src/Functional/ViewModeSwitchDiffTest.php: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -106,11 +106,19 @@ class ViewModeSwitchDiffTest extends ViewModeSwitchTestBase {
   *
   * Tests that a diff is displayed when changes are made in a view mode switch
   * field.
   *
   * @group legacy
   */
  public function testViewModeSwitchDiff(): void {
    $page = $this->getSession()->getPage();
    $this->assertTrue(TRUE);

    // Avoid failing tests because of deprecation message caused by 'diff'
    // contrib module.
    $this->expectDeprecation('The core/jquery.once asset library is deprecated in Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the core/once library instead. See https://www.drupal.org/node/3158256');
    $this->expectDeprecation('The "access_check.node.revision" service is deprecated. You should use the \'access_check.entity\' service instead. See https://www.drupal.org/node/3161210');
    $this->expectDeprecation('NodeRevisionAccessCheck is deprecated in drupal:9.3.0 and will be removed before drupal:10.0.0. Use "_entity_access" requirement with relevant operation instead. See https://www.drupal.org/node/3161210');

    // Ensure view mode switch field diff plugin is set.
    $this->drupalGet('admin/config/content/diff/fields');
    $page->selectFieldOption('fields[node__' . $this->fieldVms->getName() . '][plugin][type]', 'view_mode_switch_field_diff_builder');
+6 −0
Changes for tests/src/FunctionalJavascript/ParagraphsWidgetTest.php: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@ class ParagraphsWidgetTest extends ViewModeSwitchTestBase {

  /**
   * Test paragraphs experimental widget's preview when switching its view mode.
   *
   * @group legacy
   */
  public function testParagraphsWidgetPreview(): void {
    $page = $this->getSession()->getPage();
@@ -107,6 +109,10 @@ class ParagraphsWidgetTest extends ViewModeSwitchTestBase {
      ])
      ->save();

    // Avoid failing tests because of deprecation message caused by 'paragraphs'
    // contrib module.
    $this->expectDeprecation('Javascript Deprecation: jQuery.once() is deprecated in Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the core/once library instead. See https://www.drupal.org/node/3158256');

    // Go to node create form and test paragraphs widget's preview output when
    // switching view modes.
    $this->drupalGet('node/add/' . $node_bundle);