Turbo: Automated tests

Created on 13 November 2023, 8 months ago
Updated 5 March 2024, 4 months ago

Overview of automated tests, supporting code, progress in implementing each, and listing of what we aim to test.

For old discussion from the 8.x-1.x days that has some useful ideas: #2708615: Test coverage

Legend

✅ = Done

⌛️ = In progress/partially complete

❌ = Not started yet

Tests

  • ⌛️ Navigation:
    • ⌛️ Clicking through a few Drupal core-defined routes (currently just user/login local tabs; more TBD)
    • ❌ Clicking through various content entities such as nodes
    • ❌ Clicking through various admin pages
  • ❌ Form submission:
    • ❌ Fill and submit various core forms that don't use Ajax, e.g. user/login, admin/config/system/site-information, etc.
    • ❌ Verify that form submit redirects occur successfully and don't cause Turbo to log an error.
  • ❌ Behaviour attaching/detaching:
    • ❌ Across multiple basic link page loads
    • ❌ Across redirects, i.e. doesn't try to attach to the redirect response, only to the following page
  • drupalSettings updating (see 📌 Turbo: Improve drupalSettings updating Needs work ):
    • Verify it updates correctly over multiple 200 responses
    • Verify it updates correctly over various 4xx responses mixed in with 200s; our MutationObserver-based implementation fails on this one currently (see issue above)
  • ❌ Drupal core Ajax framework compatibility (see 🐛 Turbo: Allow Ajax links and form submits to be handled by Drupal's Ajax framework Active ):
    • ❌ Elements listed in drupalSettings.ajax have Turbo disabled, allowing Drupal core to handle them
    • ❌ Elements with the .use-ajax-submit class have Turbo disabled, allowing Drupal core to handle them
  • ❌ Fixes and workarounds for 🌱 Turbo: Tracking issue of core and contrib behaviours that need fixes to correctly detach and then attach Active
  • \refreshless_turbo_requirements() success and failure states; will probably need moving logic out of function and into classes that don't hard code the paths so we can mock the various conditions; see the package_validator_classes branch.

Links

Because I'm tired of having these tabs open all the time, lolol:

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada Ambient.Impact Toronto

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

Comments & Activities

Production build 0.69.0 2024