Add test for presence of the settings page

Created on 30 January 2025, about 1 month ago

Problem/Motivation

I would like a simple test to cover that the admin setting page is displayed with no errors.

Proposed resolution

Remaining tasks

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States swirt Florida

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

Merge Requests

Comments & Activities

  • Issue created by @swirt
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    I am puzzled by the error

    Drupal\Tests\alt_text_validation\Functional\AdminTest::testSettingsPageExists
    Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for views.view.alt_text_report with the following errors: views.view.alt_text_report:display.alt_text_validation_report.display_options.display_extenders.jsonapi_views missing schema, views.view.alt_text_report:display.alt_text_validation_report.display_options.menu.as_local_task missing schema, views.view.alt_text_report:display.alt_text_validation_report.display_options.menu.local_task_link_title missing schema, views.view.alt_text_report:display.alt_text_validation_report.display_options.menu.local_task_parent missing schema, views.view.alt_text_report:display.alt_text_validation_report.display_options.menu.local_task_weight missing schema, views.view.alt_text_report:display.alt_text_validation_report.display_options.menu.local_task_custom_parent_route missing schema
    
    /var/www/html/web/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php:98

    The View looks fine. I even re-exported it to make sure something didn't get mangled. I ran analysis on it and it reports no issues. I disabled the View so it should not be getting scanned at all. Still the errors persist.

  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    Apparently the baseclass adds a test for schema.
    https://drupal.stackexchange.com/questions/256025/missing-schema-on-cust...
    The View install is getting caught in the crossfire.

    So far I have only found the way to shut it down for the whole test

      /**
       * Set to TRUE to strict check all configuration saved.
       *
       * @see \Drupal\Core\Config\Development\ConfigSchemaChecker
       *
       * @var bool
       */
      protected $strictConfigSchema = FALSE;
    

    I was hoping to have a way to just exempt the specific View file, but have not found a way to do it yet.

  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    Works locally,

    Β» ddev phpunit
    PHPUnit 9.6.22 by Sebastian Bergmann and contributors.
    . Deprecated: Calling static trait method Drupal\alt_text_validation\AtvCommonTrait::getAuditTableName is deprecated, it should only be called on a class using the trait in /var/www/html/alt_text_validation.install on line 15
    . 2 / 2 (100%)
    Deprecated: Calling static trait method Drupal\alt_text_validation\AtvCommonTrait::getAuditTableName is deprecated, it should only be called on a class using the trait in /var/www/html/alt_text_validation.install on line 15

    OK (2 tests, 16 assertions)

    But fails in the pipeline :(

  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    The tests are considered failures not because the assertion fails, but because of the deprecation notice. In phpunit 9 that is considered a failure.

    So this test passing is blocked by πŸ“Œ Convert AtvCommonTrait to a class Active

  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    This went out with 1.0.0-alpha6 β†’ .

Production build 0.71.5 2024