Sha256: 8dd01924ba98d760d4d986bec233618daf0b830881652c52cd946bef0b7885cb

Contents?: true

Size: 1.7 KB

Versions: 18

Compression:

Stored size: 1.7 KB

Contents

Feature: Liquid drop for categories
  As a content author
  I want to be able to create category lists
  And I want to be able to create lists of pages

  Background:
    Given a page under test

  Scenario: Category list
    Given a "published" page with title "Title 1" and category "seo"
    Given a "published" page with title "Title 1" and category "affiliates"
    Given a "published" page with title "Title 1" and category "traditional"
    Given a "published" page with title "Title 1" and category "traditional"
    Given a "unpublished" page with title "Title 1" and category "traditional"
    When this page is rendered:
      """
        {% for category in categories %}{{ category.name }} ({{ category.pages.size }})
        {% endfor %}
      """
    Then the rendered content should be:
      """
        Uncategorized (0)
        Affiliates (1)
        PPC (0)
        SEO (1)
        Social (0)
        Email (0)
        Traditional (2)
      """

  Scenario: Category when there are no published pages
    Given a "unpublished" page with title "Title 1" and category "seo"
    When this page is rendered:
      """
        count: {{ categories.seo.pages.size }}
        {% for page in categories.seo.pages %}{{page.title}}{% endfor %}
      """
    Then the rendered content should be:
      """
        count: 0
      """

  Scenario: Category proxy when there is one published page
    Given a "published" page with title "Title 1" and category "seo"
    When this page is rendered:
      """
        count: {{ categories.seo.pages.size }}
        {% for page in categories.seo.pages %}{{page.title}}{% endfor %}
      """
    Then the rendered content should be:
      """
        count: 1
        Title 1
      """

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
landable-1.14.0 features/liquid/drops/categories.feature
landable-1.13.2 features/liquid/drops/categories.feature
landable-1.13.1 features/liquid/drops/categories.feature
landable-1.12.3 features/liquid/drops/categories.feature
landable-1.12.2 features/liquid/drops/categories.feature
landable-1.12.1 features/liquid/drops/categories.feature
landable-1.11.1 features/liquid/drops/categories.feature
landable-1.11.0 features/liquid/drops/categories.feature
landable-1.10.0.rc2 features/liquid/drops/categories.feature
landable-1.10.0.rc1 features/liquid/drops/categories.feature
landable-1.9.2 features/liquid/drops/categories.feature
landable-1.9.1 features/liquid/drops/categories.feature
landable-1.9.0 features/liquid/drops/categories.feature
landable-1.9.0.rc2 features/liquid/drops/categories.feature
landable-1.9.0.rc1 features/liquid/drops/categories.feature
landable-1.8.0 features/liquid/drops/categories.feature
landable-1.7.1.rc1 features/liquid/drops/categories.feature
landable-1.7.0 features/liquid/drops/categories.feature