Fixes specs
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
<button type="button" class="button hollow expanded" data-toggle="offCanvas"><%= t("admin.menu.admin") %></button>
|
<button type="button" class="button hollow expanded" data-toggle="offCanvas"><%= t("admin.menu.admin") %></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="hide-for-small-only">
|
<div id="side_menu" class="hide-for-small-only">
|
||||||
<%= side_menu %>
|
<%= side_menu %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<h3><%= page_entries_info @users %></h3>
|
<h3><%= page_entries_info @users %></h3>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<table>
|
<table id="moderation_users">
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @users.each do |user| %>
|
<% @users.each do |user| %>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ feature 'Admin activity' do
|
|||||||
|
|
||||||
visit moderation_users_path(name_or_email: user.username)
|
visit moderation_users_path(name_or_email: user.username)
|
||||||
|
|
||||||
within(".admin-list") do
|
within("#moderation_users") do
|
||||||
click_link 'Block'
|
click_link 'Block'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -67,14 +67,17 @@ feature 'Admin banners magement' do
|
|||||||
scenario 'Banners publication is listed on admin menu' do
|
scenario 'Banners publication is listed on admin menu' do
|
||||||
visit admin_root_path
|
visit admin_root_path
|
||||||
|
|
||||||
within('#admin_menu') do
|
within('#side_menu') do
|
||||||
expect(page).to have_link "Manage banners"
|
expect(page).to have_link "Manage banners"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario 'Publish a banner' do
|
scenario 'Publish a banner' do
|
||||||
visit admin_root_path
|
visit admin_root_path
|
||||||
click_link "Manage banners"
|
|
||||||
|
within('#side_menu') do
|
||||||
|
click_link "Manage banners"
|
||||||
|
end
|
||||||
|
|
||||||
click_link "Create banner"
|
click_link "Create banner"
|
||||||
|
|
||||||
@@ -108,7 +111,10 @@ feature 'Admin banners magement' do
|
|||||||
post_ended_at: (Time.now + 10.days))
|
post_ended_at: (Time.now + 10.days))
|
||||||
|
|
||||||
visit admin_root_path
|
visit admin_root_path
|
||||||
click_link "Manage banners"
|
|
||||||
|
within('#side_menu') do
|
||||||
|
click_link "Manage banners"
|
||||||
|
end
|
||||||
|
|
||||||
click_link "Edit banner"
|
click_link "Edit banner"
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ feature 'Admin feature flags' do
|
|||||||
scenario 'Enabled features are listed on menu' do
|
scenario 'Enabled features are listed on menu' do
|
||||||
visit admin_root_path
|
visit admin_root_path
|
||||||
|
|
||||||
within('#admin_menu') do
|
within('#side_menu') do
|
||||||
expect(page).to have_link "Spending proposals"
|
expect(page).to have_link "Spending proposals"
|
||||||
expect(page).to have_link "Hidden debates"
|
expect(page).to have_link "Hidden debates"
|
||||||
end
|
end
|
||||||
@@ -28,7 +28,7 @@ feature 'Admin feature flags' do
|
|||||||
|
|
||||||
visit admin_root_path
|
visit admin_root_path
|
||||||
|
|
||||||
within('#admin_menu') do
|
within('#side_menu') do
|
||||||
expect(page).not_to have_link "Spending proposals"
|
expect(page).not_to have_link "Spending proposals"
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ feature 'Admin feature flags' do
|
|||||||
|
|
||||||
visit admin_root_path
|
visit admin_root_path
|
||||||
|
|
||||||
within('#admin_menu') do
|
within('#side_menu') do
|
||||||
expect(page).not_to have_link "Spending proposals"
|
expect(page).not_to have_link "Spending proposals"
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ feature 'Admin feature flags' do
|
|||||||
|
|
||||||
visit admin_root_path
|
visit admin_root_path
|
||||||
|
|
||||||
within('#admin_menu') do
|
within('#side_menu') do
|
||||||
expect(page).to have_link "Spending proposals"
|
expect(page).to have_link "Spending proposals"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -62,13 +62,13 @@ feature 'Moderate users' do
|
|||||||
fill_in 'name_or_email', with: 'Wanda'
|
fill_in 'name_or_email', with: 'Wanda'
|
||||||
click_button 'Search'
|
click_button 'Search'
|
||||||
|
|
||||||
within(".admin-list") do
|
within("#moderation_users") do
|
||||||
expect(page).to have_content citizen.name
|
expect(page).to have_content citizen.name
|
||||||
expect(page).not_to have_content "Blocked"
|
expect(page).not_to have_content "Blocked"
|
||||||
click_link 'Block'
|
click_link 'Block'
|
||||||
end
|
end
|
||||||
|
|
||||||
within(".admin-list") do
|
within("#moderation_users") do
|
||||||
expect(page).to have_content citizen.name
|
expect(page).to have_content citizen.name
|
||||||
expect(page).to have_content "Blocked"
|
expect(page).to have_content "Blocked"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user