Skip to content

Conversation

@tobi
Copy link
Member

@tobi tobi commented Jan 2, 2026

Summary

  • Add liquid_ruby_shopify.rb adapter that stubs Shopify-specific tags and filters
  • Mark shopify_theme_dawn suite as non-default

Shopify Adapter

The new adapter registers stubs for Shopify-specific Liquid extensions:

Tags:

  • {% schema %} - outputs nothing (stores JSON schema)
  • {% style %} - outputs <style> tag
  • {% javascript %} - outputs nothing
  • {% form %} - outputs basic form tag
  • {% paginate %} - passes through content
  • {% section %}, {% sections %}, {% layout %} - output nothing

Filters:

  • Translation: t
  • Asset URLs: asset_url, image_url, img_url, shopify_asset_url, etc.
  • Money: money, money_with_currency, etc.
  • Colors: color_to_rgb, color_brightness, etc.
  • And many more...

Schema Defaults:
The adapter extracts {% schema %} JSON from templates and applies default settings values to section/block data.

Test Results

Basics ................................. 183/183 passed
Liquid Ruby ............................ 1644/1644 passed
Liquid Ruby (Lax Mode) ................. 47/47 passed
Shopify Production Recordings .......... 2335/2337 passed, 2 failed

The 2 failures use Shopify-internal test drops (NotSafeStringDrop) that test HTML safety behavior specific to Shopify's implementation.

Dawn Suite Changes

Marked as default: false because these specs:

  • Were recorded from Shopify's production Liquid implementation
  • Require Shopify-internal features (dynamic {% render %} syntax)
  • Have incomplete environment data (settings were not captured)
  • Reference specific CDN URLs

The Dawn specs are kept as reference for Shopify's internal testing infrastructure.

tobi added 2 commits January 1, 2026 23:37
Add liquid_ruby_shopify.rb adapter that stubs Shopify-specific tags and
filters (schema, style, form, section, etc.) to enable testing with the
open-source Liquid gem.

Mark shopify_theme_dawn suite as non-default since these specs:
- Were recorded from Shopify's production Liquid implementation
- Require Shopify-internal features (dynamic render, specific CDN URLs)
- Have incomplete environment data (missing settings values)

The adapter successfully runs:
- All basics, liquid_ruby, and liquid_ruby_lax specs
- 2335/2337 shopify_production_recordings specs (2 use internal test drops)
When -s specifies a specific suite (not :all), run that suite even if
it's not marked as default. This allows running shopify_theme_dawn
explicitly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant