Merge branch 'develop' into staging
This commit is contained in:
commit
9c86ef420a
12 changed files with 70 additions and 59 deletions
|
@ -180,6 +180,9 @@
|
|||
.margin-top-40 {
|
||||
margin-top: 40px;
|
||||
}
|
||||
.margin-top-20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.margin-bot-40 {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
}
|
||||
}
|
||||
#action-block {
|
||||
margin-right: 10px;
|
||||
margin: 10px;
|
||||
.action {
|
||||
background-color: #E45B51;
|
||||
text-align: center;
|
||||
|
@ -115,6 +115,9 @@
|
|||
margin-right: auto;
|
||||
}
|
||||
#notifications_list {
|
||||
.no-notification {
|
||||
margin: 0 30px 0 30px;
|
||||
}
|
||||
.notification {
|
||||
padding: 10px 10px 10px 20px;
|
||||
.dossier, .updated-at {
|
||||
|
|
|
@ -14,7 +14,7 @@ class Users::RecapitulatifController < UsersController
|
|||
@facade.dossier.next_step! 'user', 'initiate'
|
||||
flash.notice = 'Dossier soumis avec succès.'
|
||||
|
||||
render 'show'
|
||||
redirect_to users_dossier_recapitulatif_path
|
||||
end
|
||||
|
||||
def submit
|
||||
|
@ -23,7 +23,7 @@ class Users::RecapitulatifController < UsersController
|
|||
@facade.dossier.submit!
|
||||
flash.notice = 'Dossier déposé avec succès.'
|
||||
|
||||
render 'show'
|
||||
redirect_to users_dossier_recapitulatif_path
|
||||
end
|
||||
|
||||
def self.route_authorization
|
||||
|
|
|
@ -37,6 +37,7 @@ class Users::SessionsController < Sessions::SessionsController
|
|||
elsif administrateur_signed_in?
|
||||
redirect_to admin_path
|
||||
else
|
||||
flash.alert = 'Mauvais couple login / mot de passe'
|
||||
new
|
||||
render :new, status: 401
|
||||
end
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
%div.col-lg-8.col-md-8.col-sm-8.col-xs-8.title-no-expanse
|
||||
%div.carret-right
|
||||
INFORMATIONS ENTREPRISE / ASSOCIATION
|
||||
- if !@current_gestionnaire && ["draft", "updated", "replied", "initiated"].include?(@facade.dossier.state)
|
||||
%a#add_siret.action{href: users_dossier_add_siret_path(dossier_id: @facade.dossier.id)}
|
||||
%div.col-lg-4.col-md-4.col-sm-4.col-xs-4.action
|
||||
= "Renseigner un SIRET"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
%div.col-md-6.col-sm-6.col-xs-6.col-lg-6.depositaire-label Date de naissance
|
||||
%div.col-md-1.col-lg-1.col-sm-1.col-xs-1.comments-off= "-"
|
||||
%div.col-md-5.col-sm-5.col-xs-5.col-lg-5.depositaire-info= @facade.individual.birthdate
|
||||
.row.margin-top-20
|
||||
|
||||
- unless @facade.champs.nil?
|
||||
- @facade.champs.each do |champ|
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
.badge.progress-bar-warning{title: 'Notifications'}
|
||||
= procedure[:unread_notifications]
|
||||
#notifications_list.hidden
|
||||
- if @facade_data_view.unread_notifications.empty?
|
||||
.no-notification= "Aucune notification pour le moment."
|
||||
- else
|
||||
- @facade_data_view.unread_notifications.each do |notification|
|
||||
= link_to backoffice_dossier_path(notification.dossier.id) do
|
||||
.notification
|
||||
|
|
|
@ -12,17 +12,17 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
|
|||
context 'Right after sign_in I shall see all procedure states links' do
|
||||
|
||||
scenario 'Finding draft procedures' do
|
||||
page.find_by_id('draft-procedures').click
|
||||
page.find_by_id('draft-procedures').trigger('click')
|
||||
expect(page).to have_current_path(admin_procedures_draft_path, only_path: true)
|
||||
end
|
||||
|
||||
scenario 'Finding active procedures' do
|
||||
page.find_by_id('active-procedures').click
|
||||
page.find_by_id('active-procedures').trigger('click')
|
||||
expect(page).to have_current_path(admin_procedures_path, only_path: true)
|
||||
end
|
||||
|
||||
scenario 'Finding archived procedures' do
|
||||
page.find_by_id('archived-procedures').click
|
||||
page.find_by_id('archived-procedures').trigger('click')
|
||||
expect(page).to have_current_path(admin_procedures_archived_path, only_path: true)
|
||||
end
|
||||
end
|
||||
|
@ -60,13 +60,13 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
|
|||
page.find_by_id('procedure_types_de_champ_attributes_1_libelle')
|
||||
expect(Procedure.first.types_de_champ.first.libelle).to eq('libelle de champ')
|
||||
|
||||
page.find_by_id('onglet-pieces').click
|
||||
page.find_by_id('onglet-pieces').trigger('click')
|
||||
expect(page).to have_current_path(admin_procedure_pieces_justificatives_path(Procedure.first.id.to_s))
|
||||
page.find_by_id('procedure_types_de_piece_justificative_attributes_0_libelle').set 'libelle de piece'
|
||||
page.find_by_id('add_piece_justificative').click
|
||||
page.find_by_id('procedure_types_de_piece_justificative_attributes_1_libelle')
|
||||
|
||||
page.find_by_id('onglet-preview').click
|
||||
page.find_by_id('onglet-preview').trigger('click')
|
||||
expect(page).to have_current_path(admin_procedure_previsualisation_path(Procedure.first.id.to_s))
|
||||
expect(page.find_by_id('champs_1')['placeholder']).to eq('libelle de champ')
|
||||
expect(page.first('.piece-libelle').text).to eq('libelle de piece')
|
||||
|
@ -75,11 +75,11 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
|
|||
scenario 'After adding champ and file, check impossibility to publish procedure, add accompagnateur and make publication' do
|
||||
page.find_by_id('procedure_types_de_champ_attributes_0_libelle').set 'libelle de champ'
|
||||
page.find_by_id('add_type_de_champ').click
|
||||
page.find_by_id('onglet-pieces').click
|
||||
page.find_by_id('onglet-pieces').trigger('click')
|
||||
page.find_by_id('procedure_types_de_piece_justificative_attributes_0_libelle').set 'libelle de piece'
|
||||
page.find_by_id('add_piece_justificative').click
|
||||
|
||||
page.find_by_id('onglet-infos').click
|
||||
page.find_by_id('onglet-infos').trigger('click')
|
||||
expect(page).to have_current_path(admin_procedure_path(Procedure.first.id.to_s))
|
||||
expect(page.find_by_id('publish-procedure')['disabled']).to eq('disabled')
|
||||
|
||||
|
|
|
@ -23,29 +23,28 @@ feature 'As an Accompagnateur I can navigate and use each functionnality around
|
|||
context 'On index' do
|
||||
|
||||
scenario 'Switching between procedures' do
|
||||
page.all('#procedure_list a').first.click
|
||||
page.all('#procedure_list a').first.trigger('click')
|
||||
expect(page).to have_current_path(backoffice_dossiers_procedure_path(id: procedure_1.id.to_s), only_path: true)
|
||||
expect(page.find('#all_dossiers .count').text).to eq('20 dossiers')
|
||||
page.all('#procedure_list a').last.click
|
||||
page.all('#procedure_list a').last.trigger('click')
|
||||
expect(page).to have_current_path(backoffice_dossiers_procedure_path(id: procedure_2.id.to_s), only_path: true)
|
||||
expect(page.find('#all_dossiers .count').text).to eq('15 dossiers')
|
||||
#save_and_open_page
|
||||
end
|
||||
|
||||
scenario 'Searching with search bar' do
|
||||
page.find_by_id('search_area').trigger('click')
|
||||
fill_in 'q', with: '15'
|
||||
page.find_by_id('search_button').click
|
||||
page.find_by_id('tr_dossier_15').click
|
||||
page.find_by_id('search_button').trigger('click')
|
||||
page.find_by_id('tr_dossier_15').trigger('click')
|
||||
expect(page).to have_current_path("/backoffice/dossiers/15")
|
||||
end
|
||||
|
||||
scenario 'Following dossier' do
|
||||
page.all('#procedure_list a').first.click
|
||||
page.all('#procedure_list a').first.trigger('click')
|
||||
expect(page.all('#follow_dossiers .smart-listing')[0]['data-item-count']).to eq ("0")
|
||||
page.find_by_id('all_dossiers').click
|
||||
page.find_by_id('all_dossiers').trigger('click')
|
||||
expect(page.all('#dossiers_list a').first.text).to eq('Suivre')
|
||||
page.all('#dossiers_list a').first.click
|
||||
page.all('#dossiers_list a').first.trigger('click')
|
||||
expect(page.all('#follow_dossiers .smart-listing')[0]['data-item-count']).to eq ("1")
|
||||
end
|
||||
|
||||
|
@ -91,9 +90,9 @@ feature 'As an Accompagnateur I can navigate and use each functionnality around
|
|||
scenario 'Adding message' do
|
||||
page.find_by_id('tr_dossier_4').trigger('click')
|
||||
expect(page).to have_current_path(backoffice_dossier_path(4), only_path: true)
|
||||
page.find_by_id('open-message').click
|
||||
page.find_by_id('open-message').trigger('click')
|
||||
page.execute_script("$('#texte_commentaire').data('wysihtml5').editor.setValue('Contenu du nouveau message')")
|
||||
page.find_by_id('save-message').click
|
||||
page.find_by_id('save-message').trigger('click')
|
||||
expect(page.find('.last-commentaire .content').text).to eq('Contenu du nouveau message')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,11 +17,11 @@ feature 'As a User I wanna create a dossier', js: true do
|
|||
fill_in 'dossier_individual_attributes_prenom', with: 'Prenom'
|
||||
fill_in 'dossier_individual_attributes_birthdate', with: '14/10/1987'
|
||||
find(:css, "#dossier_autorisation_donnees[value='1']").set(true)
|
||||
page.find_by_id('etape_suivante').click
|
||||
page.find_by_id('etape_suivante').trigger('click')
|
||||
expect(page).to have_current_path(users_dossier_carte_path(Dossier.first.id.to_s), only_path: true)
|
||||
page.find_by_id('etape_suivante').click
|
||||
page.find_by_id('etape_suivante').trigger('click')
|
||||
fill_in 'champs_1', with: 'contenu du champ 1'
|
||||
page.find_by_id('suivant').click
|
||||
page.find_by_id('suivant').trigger('click')
|
||||
expect(page).to have_current_path(users_dossier_recapitulatif_path(Dossier.first.id.to_s), only_path: true)
|
||||
end
|
||||
|
||||
|
@ -39,14 +39,14 @@ feature 'As a User I wanna create a dossier', js: true do
|
|||
stub_request(:get, "https://api-dev.apientreprise.fr/v1/associations/#{siret}?token=#{SIADETOKEN}")
|
||||
.to_return(status: 404, body: '')
|
||||
page.find_by_id('dossier_siret').set siret
|
||||
page.find_by_id('submit-siret').click
|
||||
page.find_by_id('submit-siret').trigger('click')
|
||||
expect(page).to have_css('#recap_info_entreprise')
|
||||
find(:css, "#dossier_autorisation_donnees[value='1']").set(true)
|
||||
page.find_by_id('etape_suivante').click
|
||||
page.find_by_id('etape_suivante').trigger('click')
|
||||
expect(page).to have_current_path(users_dossier_carte_path(Dossier.first.id.to_s), only_path: true)
|
||||
page.find_by_id('etape_suivante').click
|
||||
page.find_by_id('etape_suivante').trigger('click')
|
||||
fill_in 'champs_1', with: 'contenu du champ 1'
|
||||
page.find_by_id('suivant').click
|
||||
page.find_by_id('suivant').trigger('click')
|
||||
expect(page).to have_current_path(users_dossier_recapitulatif_path(Dossier.first.id.to_s), only_path: true)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,9 +12,9 @@ feature 'As a User I want to edit a dossier I own', js: true do
|
|||
fill_in 'dossier_individual_attributes_prenom', with: 'Prenom'
|
||||
fill_in 'dossier_individual_attributes_birthdate', with: '14/10/1987'
|
||||
find(:css, "#dossier_autorisation_donnees[value='1']").set(true)
|
||||
page.find_by_id('etape_suivante').click
|
||||
page.find_by_id('etape_suivante').click
|
||||
page.find_by_id('suivant').click
|
||||
page.find_by_id('etape_suivante').trigger('click')
|
||||
page.find_by_id('etape_suivante').trigger('click')
|
||||
page.find_by_id('suivant').trigger('click')
|
||||
visit root_path
|
||||
end
|
||||
|
||||
|
@ -22,29 +22,29 @@ feature 'As a User I want to edit a dossier I own', js: true do
|
|||
|
||||
scenario 'After sign_in, I can see dossiers "à traiter" (default), and other indexes' do
|
||||
expect(page.find('#a_traiter')['class'] ).to eq('active procedure_list_element')
|
||||
page.find_by_id('brouillon').click
|
||||
page.find_by_id('a_traiter').click
|
||||
page.find_by_id('valides').click
|
||||
page.find_by_id('en_instruction').click
|
||||
page.find_by_id('termine').click
|
||||
page.find_by_id('invite').click
|
||||
page.find_by_id('brouillon').trigger('click')
|
||||
page.find_by_id('a_traiter').trigger('click')
|
||||
page.find_by_id('valides').trigger('click')
|
||||
page.find_by_id('en_instruction').trigger('click')
|
||||
page.find_by_id('termine').trigger('click')
|
||||
page.find_by_id('invite').trigger('click')
|
||||
end
|
||||
|
||||
scenario 'Getting a dossier, I want to create a new message on' do
|
||||
page.find_by_id('tr_dossier_' + Dossier.last.id.to_s).click
|
||||
page.find_by_id('tr_dossier_' + Dossier.last.id.to_s).trigger('click')
|
||||
expect(page).to have_current_path(users_dossier_recapitulatif_path(Dossier.first.id.to_s), only_path: true)
|
||||
page.find_by_id('open-message').click
|
||||
page.find_by_id('open-message').trigger('click')
|
||||
page.execute_script("$('#texte_commentaire').data('wysihtml5').editor.setValue('Contenu du nouveau message')")
|
||||
page.find_by_id('save-message').click
|
||||
page.find_by_id('save-message').trigger('click')
|
||||
expect(page.find('.last-commentaire .content').text).to eq('Contenu du nouveau message')
|
||||
end
|
||||
|
||||
scenario 'On the same dossier, I want to edit informations' do
|
||||
page.find_by_id('tr_dossier_' + Dossier.last.id.to_s).click
|
||||
page.find_by_id('edit-dossier').click
|
||||
page.find_by_id('tr_dossier_' + Dossier.last.id.to_s).trigger('click')
|
||||
page.find_by_id('edit-dossier').trigger('click')
|
||||
expect(page).to have_current_path(users_dossier_description_path(Dossier.first.id.to_s), only_path: true)
|
||||
fill_in 'champs_1', with: 'Contenu du champ 1'
|
||||
page.find_by_id('modification_terminee').click
|
||||
page.find_by_id('modification_terminee').trigger('click')
|
||||
expect(page).to have_current_path(users_dossier_recapitulatif_path(Dossier.first.id.to_s), only_path: true)
|
||||
expect(page.find('#champ-1-value').text).to eq('Contenu du champ 1')
|
||||
end
|
||||
|
|
|
@ -12,8 +12,8 @@ feature 'As a User I want to sort and paginate dossiers', js: true do
|
|||
fill_in 'dossier_individual_attributes_prenom', with: 'Prenom'
|
||||
fill_in 'dossier_individual_attributes_birthdate', with: '14/10/1987'
|
||||
find(:css, "#dossier_autorisation_donnees[value='1']").set(true)
|
||||
page.find_by_id('etape_suivante').click
|
||||
page.find_by_id('suivant').click
|
||||
page.find_by_id('etape_suivante').trigger('click')
|
||||
page.find_by_id('suivant').trigger('click')
|
||||
50.times do
|
||||
Dossier.create(procedure_id: 1, user_id: 1, state: "initiated")
|
||||
end
|
||||
|
@ -23,7 +23,7 @@ feature 'As a User I want to sort and paginate dossiers', js: true do
|
|||
context 'After sign_in, I can see my 51 dossiers on the index' do
|
||||
|
||||
scenario 'Using sort' do
|
||||
expect(page.all(:css, '#dossiers_list tr')[1].text.split(" ").first).to eq('1')
|
||||
expect(page.all(:css, '#dossiers_list tr')[0].text.split(" ").first).to eq('1')
|
||||
expect(page.all(:css, '#dossiers_list tr')[2].text.split(" ").first).to eq('2')
|
||||
visit "/users/dossiers?dossiers_smart_listing[sort][id]=desc"
|
||||
expect(page.all(:css, '#dossiers_list tr')[1].text.split(" ").first).to eq('51')
|
||||
|
@ -34,16 +34,16 @@ feature 'As a User I want to sort and paginate dossiers', js: true do
|
|||
end
|
||||
|
||||
scenario 'Using pagination' do
|
||||
expect(page.all(:css, '#dossiers_list tr')[1].text.split(" ").first).to eq('1')
|
||||
page.find('.next_page a').click
|
||||
expect(page.all(:css, '#dossiers_list tr')[0].text.split(" ").first).to eq('1')
|
||||
page.find('.next_page a').trigger('click')
|
||||
wait_for_ajax
|
||||
expect(page.all(:css, '#dossiers_list tr')[1].text.split(" ").first).to eq('8')
|
||||
page.find('.next_page a').click
|
||||
page.find('.next_page a').trigger('click')
|
||||
wait_for_ajax
|
||||
expect(page.all(:css, '#dossiers_list tr')[1].text.split(" ").first).to eq('15')
|
||||
page.find('.prev a').click
|
||||
page.find('.prev a').trigger('click')
|
||||
wait_for_ajax
|
||||
page.find('.prev a').click
|
||||
page.find('.prev a').trigger('click')
|
||||
wait_for_ajax
|
||||
expect(page.all(:css, '#dossiers_list tr')[1].text.split(" ").first).to eq('1')
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue