Shopify / Shopify/liquid-spec

Add a CI step to run SFR specific specs

Open
#17 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
19
Forks
8
Avg merge
6h 41m
Merged PRs (30d)
2

Description

With the addition of #15 we need a way to run some liquid specs in the context of storefront-renderer. I think adding a CI step to execute these tests in SFR would be the ideal way forward.

Storefront Renderer Challenges

We don't have access to the Liquid filters, tags, or drops defined in storefront renderer. So running the tests in this repo is challenging. I may end up getting these types of specs to run in storefront-renderer itself or setting up a build container on this repo that will run them with the SFR code.

Missing Storefront Liquid Features
# Tag
Liquid::Template.register_tag('layout', Layout)
Liquid::Template.register_tag('form', FormTag)
Liquid::Template.register_tag('paginate', PaginateTag)
Liquid::Template.register_tag('style', StyleTag)
Liquid::Template.register_tag('render', RenderTag)
Liquid::Template.register_tag('javascript', SectionAndBlock::JavaScriptTag)
Liquid::Template.register_tag('schema', SectionAndBlock::SchemaTag)
Liquid::Template.register_tag('stylesheet', SectionAndBlock::StyleSheetTag)
Liquid::Template.register_tag('section', SectionAndBlock::SectionTag)

# Filters
Liquid::Template.register_filter(FormFilter)
Liquid::Template.register_filter(I18nFilter)
Liquid::Template.register_filter(UrlFilter)
Liquid::Template.register_filter(JsonFilter)
Liquid::Template.register_filter(ColorFilter)
Liquid::Template.register_filter(MoneyFilter)
Liquid::Template.register_filter(StringFilter)
Liquid::Template.register_filter(CollectionFilter)
Liquid::Template.register_filter(TagFilter)
Liquid::Template.register_filter(CryptoFilter)
Liquid::Template.register_filter(CustomerAccountFilter)
Liquid::Template.register_filter(CurrencyFormFilter)
Liquid::Template.register_filter(PaginationFilter)
Liquid::Template.register_filter(WeightFilter)
Liquid::Template.register_filter(TextFilter)
Liquid::Template.register_filter(FontFilter)
Liquid::Template.register_filter(DistanceFilter)
Liquid::Template.register_filter(MediaFilter)
Liquid::Template.register_filter(ThemeFilter)
Liquid::Template.register_filter(MetafieldFilter)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing issue #15 and the Storefront Renderer context described here, then determine where the SFR-specific Liquid specs should execute. Use the listed missing tags and filters to define the required test environment; done means CI runs these specs with the Storefront Renderer features available.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
ci-cd, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.