Do not show flaggable and followable buttons on budgets_investment and proposals pages when user is not logged.
This commit is contained in:
committed by
Senén Rodero Rodríguez
parent
0ffa213a65
commit
97ee107157
@@ -329,6 +329,14 @@ feature 'Budget Investments' do
|
||||
end
|
||||
end
|
||||
|
||||
scenario "Not sow flaggable buttons" do
|
||||
investment = create(:budget_investment, heading: heading)
|
||||
|
||||
visit budget_investment_path(budget_id: budget.id, id: investment.id)
|
||||
|
||||
expect(page).not_to have_selector ".js-follow"
|
||||
end
|
||||
|
||||
scenario "Show back link contains heading id" do
|
||||
investment = create(:budget_investment, heading: heading)
|
||||
visit budget_investment_path(budget, investment)
|
||||
|
||||
@@ -61,6 +61,8 @@ feature 'Proposals' do
|
||||
expect(page).to have_content I18n.l(proposal.created_at.to_date)
|
||||
expect(page).to have_selector(avatar(proposal.author.name))
|
||||
expect(page.html).to include "<title>#{proposal.title}</title>"
|
||||
expect(page).not_to have_selector ".js-flag-actions"
|
||||
expect(page).not_to have_selector ".js-follow"
|
||||
|
||||
within('.social-share-button') do
|
||||
expect(page.all('a').count).to be(4) # Twitter, Facebook, Google+, Telegram
|
||||
|
||||
Reference in New Issue
Block a user