ajustement test PJ dossier en construction
This commit is contained in:
parent
249da03287
commit
ec24ce3dad
2 changed files with 2 additions and 3 deletions
|
@ -20,7 +20,6 @@ class AttachmentsController < ApplicationController
|
|||
@attachment = @blob.attachments.find(params[:id])
|
||||
@attachment.purge_later
|
||||
flash.notice = 'La pièce jointe a bien été supprimée.'
|
||||
|
||||
if params[:dossier_id]
|
||||
@champ = find_champ
|
||||
else
|
||||
|
|
|
@ -30,6 +30,7 @@ describe "Dossier en_construction" do
|
|||
visit_dossier(dossier)
|
||||
|
||||
click_on "Supprimer le fichier toto.txt"
|
||||
expect(page).not_to have_text("toto.txt")
|
||||
|
||||
input_selector = "#attachment-multiple-empty-#{champ.public_id}"
|
||||
expect(page).to have_selector(input_selector)
|
||||
|
@ -37,7 +38,6 @@ describe "Dossier en_construction" do
|
|||
|
||||
wait_until { champ.reload.for_export == 'file.pdf' }
|
||||
expect(page).to have_text("file.pdf")
|
||||
expect(page).not_to have_text("toto.txt")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -54,13 +54,13 @@ describe "Dossier en_construction" do
|
|||
visit_dossier(dossier)
|
||||
|
||||
click_on "Supprimer le fichier toto.png"
|
||||
expect(page).not_to have_text("toto.png")
|
||||
|
||||
input_selector = "##{champ.input_id}"
|
||||
expect(page).to have_selector(input_selector)
|
||||
find(input_selector).attach_file(Rails.root.join('spec/fixtures/files/file.pdf'))
|
||||
|
||||
expect(page).to have_text("file.pdf")
|
||||
expect(page).not_to have_text("toto.png")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue