Use a switch to enable/disable homepage features

So it's consistent with the way we enable/disable other features.
This commit is contained in:
Javi Martín
2021-08-28 03:05:44 +02:00
parent fabe97e506
commit 7b8e892f9c
9 changed files with 26 additions and 30 deletions

View File

@@ -33,7 +33,7 @@ describe "Homepage", :admin do
within("#widget_feed_#{proposals_feed.id}") do
select "1", from: "widget_feed_limit"
click_button "Enable"
click_button "No"
end
visit root_path
@@ -52,7 +52,7 @@ describe "Homepage", :admin do
visit admin_homepage_path
within("#widget_feed_#{debates_feed.id}") do
select "2", from: "widget_feed_limit"
click_button "Enable"
click_button "No"
end
visit root_path
@@ -73,12 +73,12 @@ describe "Homepage", :admin do
within("#widget_feed_#{proposals_feed.id}") do
select "3", from: "widget_feed_limit"
click_button "Enable"
click_button "No"
end
within("#widget_feed_#{debates_feed.id}") do
select "3", from: "widget_feed_limit"
click_button "Enable"
click_button "No"
end
visit root_path
@@ -100,7 +100,7 @@ describe "Homepage", :admin do
visit admin_homepage_path
within("#widget_feed_#{processes_feed.id}") do
select "3", from: "widget_feed_limit"
click_button "Enable"
click_button "No"
end
visit root_path
@@ -153,8 +153,8 @@ describe "Homepage", :admin do
create(:proposal, tag_list: "Sport")
visit admin_homepage_path
within("#setting_#{user_recommendations.id}") do
click_button "Enable"
within("#edit_setting_#{user_recommendations.id}") do
click_button "No"
end
expect(page).to have_content "Value updated"