[Fix #6512] admin preview in new tab
This commit is contained in:
parent
c7344e5a60
commit
9679e233cd
2 changed files with 6 additions and 5 deletions
|
@ -4,7 +4,7 @@
|
|||
metadatas: ["Créée le #{@procedure.created_at.strftime('%d/%m/%Y')} - n° #{@procedure.id}", "#{@procedure.close? ? "Close le #{@procedure.closed_at.strftime('%d/%m/%Y')}" : @procedure.locked? ? "Publiée - #{procedure_lien(@procedure)}" : "Brouillon"}"] }
|
||||
|
||||
.container.procedure-admin-container
|
||||
= link_to apercu_admin_procedure_path(@procedure), class: 'button', id: "preview-procedure" do
|
||||
= link_to apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'button', id: "preview-procedure" do
|
||||
%span.icon.preview
|
||||
Prévisualiser
|
||||
|
||||
|
|
|
@ -77,11 +77,12 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
|
|||
|
||||
click_on Procedure.last.libelle
|
||||
|
||||
find('#preview-procedure').click
|
||||
|
||||
preview_window = window_opened_by { find('#preview-procedure').click }
|
||||
within_window(preview_window) do
|
||||
expect(page).to have_current_path(apercu_admin_procedure_path(Procedure.last))
|
||||
expect(page).to have_field('libelle de champ')
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'After adding champ and file, make publication' do
|
||||
page.refresh
|
||||
|
|
Loading…
Reference in a new issue