Sha256: 6236a3ad91095c104d0108c8a6d2b18834c9c55d21ba5c529c44431ff58a599d

Contents?: true

Size: 1.37 KB

Versions: 33

Compression:

Stored size: 1.37 KB

Contents

Feature: Tagged content
  As a designer
  In order to organize my content
  I want to be able to tag it

Background:
  Given I have the site: "test site" set up
  And I have a custom model named "Posts" with
    | label         | type      | required    |
    | Title         | string    | true        |
    | Body          | string    | false       |
    | Tags          | tags      | false       |
  And I have entries for "Posts" with
    | title             | body          | tags              |
    | Fashion post      | Fashion body  | blogging, fashion |
    | Diet post         | Diet body     | blogging, diet    |

Scenario: Navigate by tags
  Given a page named "my-posts" with the template:
    """
    {% if params.tag %}
     {% with_scope tags: params.tag %}
       {% assign posts = contents.posts.all %}
     {% endwith_scope %}
    {% else %}
     {% assign posts = contents.posts.all %}
    {% endif %}

    {% for post in posts %}
     {{ post.title }}<br>
     {% for tag in post.tags %}
     <a href="/my-posts?tag={{ tag }}">{{ tag }}</a>
     {% endfor %}
     <hr>
    {% endfor %}
    """
  When I view the rendered page at "/my-posts"
  Then I should see "Fashion post"
  And I should see "Diet post"
  When I follow "blogging"
  Then I should see "Fashion post"
  And I should see "Diet post"
  When I follow "fashion"
  Then I should see "Fashion"
  And I should not see "Diet"

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
locomotivecms-3.0.0.rc3 features/public/tags.feature
locomotivecms-3.0.0.rc2 features/public/tags.feature
locomotivecms-3.0.0.rc1 features/public/tags.feature
locomotivecms-3.0.0.pre.beta.1 features/public/tags.feature
locomotivecms-3.0.0.pre.alpha.3 features/public/tags.feature
locomotive_cms-2.5.7 features/public/tags.feature
locomotivecms-3.0.0.pre.alpha.2 features/public/tags.feature
locomotivecms-3.0.0.pre.alpha features/public/tags.feature
locomotive_cms-2.5.6 features/public/tags.feature
locomotive_cms-2.5.6.rc2 features/public/tags.feature
locomotive_cms-2.5.6.rc1 features/public/tags.feature
locomotive_cms-2.5.5 features/public/tags.feature
locomotive_cms-2.5.4 features/public/tags.feature
locomotive_cms-2.5.3 features/public/tags.feature
locomotive_cms-2.5.2 features/public/tags.feature
locomotive_cms-2.5.1 features/public/tags.feature
locomotive_cms-2.5.0 features/public/tags.feature
locomotive_cms-2.5.0.rc3 features/public/tags.feature
locomotive_cms-2.5.0.rc2 features/public/tags.feature
locomotive_cms-2.5.0.rc1 features/public/tags.feature