Add opensimplif feature flip to hide user/gestionnaire tabs
This commit is contained in:
parent
86e6dd0233
commit
101bd68252
7 changed files with 40 additions and 10 deletions
|
@ -1,6 +1,3 @@
|
|||
=link_to 'Tous mes dossiers en CSV', backoffice_download_dossiers_tps_path, {class: 'btn btn-success btn-sm', style: 'float: right; margin-right: 4%; margin-top: 7px'}
|
||||
%h1 Gestion des dossiers
|
||||
|
||||
#filter_by_procedure{style:'margin-left: 5%'}
|
||||
%select{onchange: 'location = this.value', style:'margin-top: 10px; margin-bottom: 10px', id: 'filter_by_procedure_select'}
|
||||
%option{value: backoffice_dossiers_path}
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#backoffice_index
|
||||
#pref_list_menu
|
||||
= render partial: 'backoffice/dossiers/pref_list'
|
||||
|
||||
=link_to 'Tous mes dossiers en CSV', backoffice_download_dossiers_tps_path, {class: 'btn btn-success btn-sm', style: 'float: right; margin-right: 4%; margin-top: 7px'}
|
||||
%h1 Gestion des dossiers
|
||||
|
||||
-unless Features.opensimplif
|
||||
= render partial: 'backoffice/dossiers/onglets'
|
||||
|
||||
= smart_listing_render :dossiers
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
%h1 Mes dossiers
|
||||
|
||||
%br
|
||||
#onglets
|
||||
%ul.nav.nav-tabs
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#users_index
|
||||
%h1 Mes dossiers
|
||||
|
||||
-unless Features.opensimplif
|
||||
= render partial: 'onglets'
|
||||
|
||||
= smart_listing_render :dossiers
|
||||
|
|
|
@ -89,4 +89,16 @@ feature 'on click on tabs button' do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "OpenSimplif" do
|
||||
before do
|
||||
allow(Features).to receive(:opensimplif).and_return(true)
|
||||
visit backoffice_dossiers_url
|
||||
end
|
||||
|
||||
scenario "it hides the tabs" do
|
||||
expect(page).to_not have_css('#filter_by_procedure')
|
||||
expect(page).to_not have_css('#onglets')
|
||||
end
|
||||
end
|
||||
end
|
|
@ -99,4 +99,15 @@ feature 'on click on tabs button' do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "OpenSimplif" do
|
||||
before do
|
||||
allow(Features).to receive(:opensimplif).and_return(true)
|
||||
visit users_dossiers_url
|
||||
end
|
||||
|
||||
scenario "it hides the tabs" do
|
||||
expect(page).to_not have_css('#onglets')
|
||||
end
|
||||
end
|
||||
end
|
|
@ -83,6 +83,10 @@ class Features
|
|||
def self.unified_login
|
||||
false
|
||||
end
|
||||
|
||||
def self.opensimplif
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
WebMock.disable_net_connect!(allow_localhost: true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue