Group related specs together
This commit is contained in:
@@ -20,9 +20,16 @@ feature 'Legislation Proposals' do
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'Each user has a different and consistent random proposals order', :js do
|
||||
create_list(:legislation_proposal, 10, process: process)
|
||||
feature "Random pagination" do
|
||||
before do
|
||||
create_list(
|
||||
:legislation_proposal,
|
||||
(Legislation::Proposal.default_per_page + 2),
|
||||
process: process
|
||||
)
|
||||
end
|
||||
|
||||
scenario 'Each user has a different and consistent random proposals order', :js do
|
||||
in_browser(:one) do
|
||||
login_as user
|
||||
visit legislation_process_proposals_path(process)
|
||||
@@ -49,8 +56,6 @@ feature 'Legislation Proposals' do
|
||||
end
|
||||
|
||||
scenario 'Random order maintained with pagination', :js do
|
||||
create_list(:legislation_proposal, (Kaminari.config.default_per_page + 2), process: process)
|
||||
|
||||
login_as user
|
||||
visit legislation_process_proposals_path(process)
|
||||
first_page_proposals_order = legislation_proposals_order
|
||||
@@ -65,17 +70,12 @@ feature 'Legislation Proposals' do
|
||||
end
|
||||
|
||||
scenario 'Does not crash when the seed is not a number' do
|
||||
create_list(
|
||||
:legislation_proposal,
|
||||
(Legislation::Proposal.default_per_page + 2),
|
||||
process: process
|
||||
)
|
||||
|
||||
login_as user
|
||||
visit legislation_process_proposals_path(process, random_seed: "Spoof")
|
||||
|
||||
expect(page).to have_content "You're on page 1"
|
||||
end
|
||||
end
|
||||
|
||||
context 'Selected filter' do
|
||||
scenario 'apperars even if there are not any selected poposals' do
|
||||
|
||||
Reference in New Issue
Block a user