Code style cleanup, Schema check, Basic Tests

Created on 8 February 2022, almost 3 years ago
Updated 7 March 2024, 11 months ago

Problem/Motivation

The drowl_... modules have a long history and evolved over time. While older branches are or will be deprecated, the latest release should become as stable as possible, as we plan to do future updates 100% in code and not manually on (customer) sites to keep things more consistent.

For that reason, the 4.x branch should get a code style cleanup, schema check and get basic tests. In the main module as well as in submodules.

As tests will be the most time-consuming and hardest part, we should start with the most basic tests, which might for example be:

  • Test page status (frontpage) after installation (Statuscode 200 for <front>
  • Test node/add form statuscode
  • Test node statuscode after save
  • Test settings page statuscode & permission from permissions.yml admin/config/system/drowl-paragraphs
  • Test settings page functionality (defaults / edit / save): admin/config/system/drowl-paragraphs
  • ...?

To be able to implement them in a useful way, first check, which functionalities the module provides and get a demonstration.

Afterwards, we could have a look at similar modules, what and how they test. For example, test the drowl_paragraphs_settings field type like other custom field types are tested.

As the submodules provide certain predefined paragraph types, we should test

  • for each's existence (individually) at /admin/structure/paragraphs_type
  • for each's existence (individually) in the node/add form after adding a paragraph field to the node with layout_paragraphs widget (important: Some subelements are only present under their defined parents (Tabs)!

Finally, we could test significant main-functionality of the module itself, like adding all paragraph types and ensuring the output contains all fields and is as expected.

Tests should be implemented from quick and easy to complicated, as it will take a lot of time to have a good test coverage.

Additional internal information
See https://app.clickup.com/t/1xwmt9x

📌 Task
Status

Closed: won't fix

Version

4.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024