The module has no automated tests at the moment, so CI only runs the linters. Adding a kernel test that covers the parts most likely to break:

- GlideStyle::render() attaches glidejs/glide and outputs the expected drupalSettings for a test view
- option normalization: focus_at cast to int (and "center" kept as is), autoplay falling back to 3000 when the speed is empty, disable_swipe / disable_drag / unlimited_touch resulting in false, peek as a number and as JSON
- the rendered markup contains one .glide__slide per row and the data attributes the JS relies on (view and display id), so we notice if the theme hook ever stops getting the rows
- the glidejs/glide library depends on core/drupalSettings, core/once and glidejs/glide_external, and the CDN URLs are pinned to a version

Needs a small test module with a view config that uses the glide style.

Comments

junkuncz created an issue. See original summary.

  • junkuncz committed 319017e0 on 1.x
    Issue #3643028: Add kernel test coverage for the Glide style plugin
    
junkuncz’s picture

AI disclosure: the test was written with help from Claude. I ran it locally (4 tests, all passing) and checked that it actually fails when one of the fixes is reverted (removing core/once from the library made testLibraries fail).

junkuncz’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

junkuncz’s picture

Status: Fixed » Closed (fixed)