Merge pull request #2170 from consul/design

Design improvements
This commit is contained in:
Alberto García
2017-12-14 11:31:31 +01:00
committed by GitHub
29 changed files with 228 additions and 266 deletions

View File

@@ -10,6 +10,15 @@ feature 'Proposals' do
end
context 'Index' do
before do
Setting['feature.allow_images'] = true
end
after do
Setting['feature.allow_images'] = nil
end
scenario 'Lists featured and regular proposals' do
featured_proposals = create_featured_proposals
proposals = [create(:proposal), create(:proposal), create(:proposal)]
@@ -61,7 +70,7 @@ feature 'Proposals' do
visit proposals_path(proposal)
within("#proposal_#{proposal.id}") do
expect(page).to have_css("div.no-image")
expect(page).to_not have_css("div.with-image")
end
within("#proposal_#{proposal_with_image.id}") do
expect(page).to have_css("img[alt='#{proposal_with_image.image.title}']")