From c5917db28c2a7d7200deb05d392fafbdabbfb3e1 Mon Sep 17 00:00:00 2001 From: Xavier J Date: Wed, 14 Dec 2016 18:53:40 +0100 Subject: [PATCH] Fix tests again --- .../lateral_page_pref_list_dossier_backoffice_spec.rb | 2 +- spec/features/backoffice/navigate_to_dossier_spec.rb | 4 ++-- spec/views/admin/procedures/show.html.haml_spec.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/features/backoffice/lateral_page_pref_list_dossier_backoffice_spec.rb b/spec/features/backoffice/lateral_page_pref_list_dossier_backoffice_spec.rb index 938e2f5da..8b75df35e 100644 --- a/spec/features/backoffice/lateral_page_pref_list_dossier_backoffice_spec.rb +++ b/spec/features/backoffice/lateral_page_pref_list_dossier_backoffice_spec.rb @@ -67,7 +67,7 @@ feature 'usage of pref list dossier lateral panel', js: true do scenario 'dossier is brought up to date', js: true do wait_for_ajax - expect(page).not_to have_selector("a.sortable[data-attr='entreprise.siren']") + expect(page).not_to have_selector("a.sortable[data-attr='entreprise.siren']", visible: true) end context 'when on click on close pref list button' do diff --git a/spec/features/backoffice/navigate_to_dossier_spec.rb b/spec/features/backoffice/navigate_to_dossier_spec.rb index 78a518b8c..d65e6d99a 100644 --- a/spec/features/backoffice/navigate_to_dossier_spec.rb +++ b/spec/features/backoffice/navigate_to_dossier_spec.rb @@ -23,7 +23,7 @@ feature 'on backoffice page' do end context 'when he click on first dossier', js: true do before do - page.find("#tr_dossier_#{dossier.id}").click + page.find("#tr_dossier_#{dossier.id}", visible: true).click end scenario 'it redirect to dossier page' do @@ -40,7 +40,7 @@ feature 'on backoffice page' do create :follow, gestionnaire: gestionnaire, dossier: dossier_individual visit backoffice_dossiers_procedure_path(id: procedure_individual.id) - page.find("#tr_dossier_#{dossier_individual.id}").click + page.find("#tr_dossier_#{dossier_individual.id}", visible: true).click end scenario 'it redirect to dossier page' do diff --git a/spec/views/admin/procedures/show.html.haml_spec.rb b/spec/views/admin/procedures/show.html.haml_spec.rb index 71fcbfed6..445685f4e 100644 --- a/spec/views/admin/procedures/show.html.haml_spec.rb +++ b/spec/views/admin/procedures/show.html.haml_spec.rb @@ -30,7 +30,7 @@ describe 'admin/procedures/show.html.haml', type: :view do end describe 'publish button is visible' do - it { expect(rendered).to have_css('a#publish') } + it { expect(rendered).to have_css('a#publish-procedure') } it { expect(rendered).not_to have_css('button#archive') } it { expect(rendered).not_to have_css('a#reenable') } end