Fix Tests for Drupal 10

Created on 10 February 2024, 5 months ago
Updated 24 February 2024, 4 months ago

Problem/Motivation

Tests are not passing for Drupal 10:

$ ../vendor/phpunit/phpunit/phpunit -c core/ modules/contrib/twig_ui/ --verbose
PHPUnit 9.6.15 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.1.16
Configuration: /var/www/html/web/core/phpunit.xml.dist

Testing /var/www/html/web/modules/contrib/twig_ui
............................E..........                           39 / 39 (100%)

Time: 08:00.645, Memory: 6.00 MB

There was 1 error:

1) Drupal\Tests\twig_ui\FunctionalJavascript\TemplateFormTest::testFormSubmission
WebDriver\Exception\ElementNotInteractable: element not interactable
  (Session info: headless chrome=98.0.4758.102)
  (Driver info: chromedriver=98.0.4758.102 (273bf7ac8c909cde36982d27f66f3c70846a3718-refs/branch-heads/4758@{#1151}),platform=Linux 5.10.104-linuxkit x86_64)

/var/www/html/vendor/instaclick/php-webdriver/lib/WebDriver/Exception.php:198
/var/www/html/vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php:169
/var/www/html/vendor/instaclick/php-webdriver/lib/WebDriver/AbstractWebDriver.php:240
/var/www/html/vendor/instaclick/php-webdriver/lib/WebDriver/Container.php:241
/var/www/html/vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php:692
/var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:168
/var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:202
/var/www/html/web/core/tests/Drupal/FunctionalJavascriptTests/DrupalSelenium2Driver.php:179
/var/www/html/vendor/behat/mink/src/Element/NodeElement.php:105
/var/www/html/web/modules/contrib/twig_ui/tests/src/FunctionalJavascript/TemplateFormTest.php:209
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728

ERRORS!
Tests: 39, Assertions: 456, Errors: 1.

Proposed resolution

Fix tests.

Remaining tasks

Fix tests.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Chris Burge

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

Merge Requests

Comments & Activities

  • Issue created by @Chris Burge
  • πŸ‡ΊπŸ‡ΈUnited States Chris Burge

    While we're in here, let's address deprecations, too:

    Remaining self deprecation notices (195)
    
      45x: The definition for the 'twig_ui.template.node.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        4x in TemplateManagerTest::testGetTemplates from Drupal\Tests\twig_ui\Functional
        4x in TemplateManagerTest::testGetTemplatesByTheme from Drupal\Tests\twig_ui\Functional
        4x in TemplateManagerTest::testGetTemplate from Drupal\Tests\twig_ui\Functional
        4x in TemplateManagerTest::testTemplateExists from Drupal\Tests\twig_ui\Functional
        4x in TemplateManagerTest::testSyncTemplateFiles from Drupal\Tests\twig_ui\Functional
        ...
    
      22x: The definition for the 'twig_ui.template.node_page.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        4x in RenderTest::testRender from Drupal\Tests\twig_ui\Functional
        2x in TemplateManagerTest::testGetTemplates from Drupal\Tests\twig_ui\Functional
        2x in TemplateManagerTest::testGetTemplatesByTheme from Drupal\Tests\twig_ui\Functional
        2x in TemplateManagerTest::testGetTemplate from Drupal\Tests\twig_ui\Functional
        2x in TemplateManagerTest::testTemplateExists from Drupal\Tests\twig_ui\Functional
        ...
    
      21x: assertFileNotExists() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertFileDoesNotExist() instead.
        16x in TemplateManagerTest::testSyncTemplateFiles from Drupal\Tests\twig_ui\Functional
        5x in TemplateManagerTest::testDeleteTemplateFiles from Drupal\Tests\twig_ui\Functional
    
      20x: The definition for the 'twig_ui.template.node_event.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        4x in TemplateManagerTest::testSyncTemplateFiles from Drupal\Tests\twig_ui\Functional
        2x in TemplateManagerTest::testGetTemplates from Drupal\Tests\twig_ui\Functional
        2x in TemplateManagerTest::testGetTemplatesByTheme from Drupal\Tests\twig_ui\Functional
        2x in TemplateManagerTest::testGetTemplate from Drupal\Tests\twig_ui\Functional
        2x in TemplateManagerTest::testTemplateExists from Drupal\Tests\twig_ui\Functional
        ...
    
      8x: The definition for the 'twig_ui.template.page.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        4x in InstallTest::testUpdate8101 from Drupal\Tests\twig_ui\Kernel
        2x in ImmutableRegistryTest::testGet from Drupal\Tests\twig_ui\Kernel
        2x in RegistryTest::testRegistry from Drupal\Tests\twig_ui\Kernel
    
      4x: The definition for the 'twig_ui.template.node_aa.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        4x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      4x: The definition for the 'twig_ui.template.node_ab.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        4x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      3x: The definition for the 'twig_ui.template.test_template.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TemplateFormTest::testForm from Drupal\Tests\twig_ui\Functional
        1x in SettingsTest::testDefaultSelectedThemesImplementation from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_a.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_b.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_c.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_d.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_e.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_f.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_g.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_h.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_i.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_j.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_k.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_l.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_m.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_n.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_o.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_p.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_q.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_r.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_s.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_t.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_u.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_v.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_w.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_x.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_y.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_z.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_ac.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_ad.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_ae.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_af.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      2x: The definition for the 'twig_ui.template.node_abc.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        2x in TwigTemplateListFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      1x: The definition for the 'twig_ui.template.node_duplicate.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        1x in TemplateFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      1x: The definition for the 'twig_ui.template.disabled_template.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        1x in TemplateFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      1x: The definition for the 'twig_ui.template.another_template.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        1x in TemplateFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      1x: The definition for the 'twig_ui.template.clone_node.themes' sequence declares the type of its items in a way that is deprecated in drupal:8.0.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/2442603
        1x in TemplateFormTest::testForm from Drupal\Tests\twig_ui\Functional
    
      1x: assertDirectoryNotIsWritable() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDirectoryIsNotWritable() instead.
        1x in TemplateManagerTest::testPrepareTemplatesDirectory from Drupal\Tests\twig_ui\Functional
    
      1x: assertDirectoryNotExists() is deprecated and will be removed in PHPUnit 10. Refactor your code to use assertDirectoryDoesNotExist() instead.
        1x in InstallTest::testUninstallation from Drupal\Tests\twig_ui\Kernel
    
    
  • Status changed to Needs review 5 months ago
  • πŸ‡ΊπŸ‡ΈUnited States Chris Burge
  • Merge request !9Fix Tests for Drupal 10 β†’ (Merged) created by Chris Burge
  • Pipeline finished with Skipped
    5 months ago
    #91719
  • Issue was unassigned.
  • Status changed to Fixed 5 months ago
  • πŸ‡ΊπŸ‡ΈUnited States Chris Burge
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024