Skip to content

Commit

Permalink
test instructeur/dossiers/show
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit-MINT committed Jan 27, 2025
1 parent 645b1ba commit bcdf2ff
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion spec/views/instructeur/dossiers/show.html.haml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

describe 'instructeurs/dossiers/show', type: :view do
let(:current_instructeur) { create(:instructeur) }
let(:procedure) { create(:procedure) }
let(:assign_to) { create(:assign_to, instructeur: current_instructeur, procedure: procedure) }
let(:procedure_presentation) { create(:procedure_presentation, assign_to: assign_to) }
let(:dossier) { create(:dossier, :en_construction) }
let(:statut) { { statut: 'tous' } }
let(:procedure_presentation) { double(instructeur: current_instructeur, procedure: dossier.procedure) }

before do
sign_in(current_instructeur.user)
Expand Down Expand Up @@ -267,4 +269,28 @@
end
end
end

describe "Labels notice" do
context "Instructeur did not close the notice" do
it "displays notice" do
within('.dropdown') do
expect(subject).to have_selector("#labels-notice")
end
end
end

context "Instructeur close the notice" do
before do
within("#labels-notice") do
click_button
end
end

it "does not display the notice" do
within('.dropdown') do
expect(subject).not_to have_selector("#labels-notice")
end
end
end
end
end

0 comments on commit bcdf2ff

Please sign in to comment.