Sha256: ec16f4267d1c4b5042e8485281fa1e10a7b2cb75526f186adcc41b22a7f113ff
Contents?: true
Size: 1.6 KB
Versions: 2
Compression:
Stored size: 1.6 KB
Contents
require 'spec_helper' RSpec.feature "Picture Library" do before do authorize_as_admin end describe "Tagging" do let!(:picture_1) { create(:picture, tag_list: 'tag1', name: 'TaggedWith1') } let!(:picture_2) { create(:picture, tag_list: 'tag2', name: 'TaggedWith2') } scenario "it's possible to filter tags by clicking on its name in the tag list." do visit alchemy.admin_pictures_path click_on 'tag1 (1)' expect(page).to have_content('TaggedWith1') expect(page).not_to have_content('TaggedWith2') end scenario "it's possible to undo tag filtering by clicking on an active tag name" do visit alchemy.admin_pictures_path click_on 'tag1 (1)' expect(page).to have_content('TaggedWith1') expect(page).not_to have_content('TaggedWith2') click_on 'tag1 (1)' expect(page).to have_content('TaggedWith1') expect(page).to have_content('TaggedWith2') end scenario "it's possible to tighten the tag scope by clicking on another tag name." do visit alchemy.admin_pictures_path click_on 'tag1 (1)' click_on 'tag2 (1)' expect(page).to have_content("You don't have any images in your archive") end end describe "Filter by tag" do let!(:picture) { create(:picture, tag_list: 'bla') } scenario "lists all applied tags." do visit alchemy.admin_pictures_path expect(page).to have_content('bla') end scenario "it's possible to filter pictures by tag." do visit alchemy.admin_pictures_path click_on 'bla (1)' expect(page).to have_content('bla') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alchemy_cms-3.1.3 | spec/features/admin/picture_library_integration_spec.rb |
alchemy_cms-3.2.0.beta | spec/features/admin/picture_library_integration_spec.rb |