From 0ba61266170079bf0734e163f38ac58663171018 Mon Sep 17 00:00:00 2001 From: Jan Sandbrink Date: Wed, 20 May 2015 16:27:40 +0200 Subject: [PATCH] refer to braedcrumb by class, not tag h1 is quite a bad matcher for the page you are looking at... the class breadcrumb is better, but still not great... --- spec/features/menu_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/features/menu_spec.rb b/spec/features/menu_spec.rb index a04c8de062..61cefb8e38 100644 --- a/spec/features/menu_spec.rb +++ b/spec/features/menu_spec.rb @@ -67,7 +67,7 @@ describe 'project menu', type: :feature do it 'leads to cost reports' do click_on 'Cost Reports' - expect(page).to have_selector('h1', text: 'HomePonyoCost Reports') + expect(page).to have_selector('.breadcrumb', text: 'HomePonyoCost Reports') end end @@ -96,7 +96,7 @@ describe 'project menu', type: :feature do click_on 'Cost Reports' end - expect(page).to have_selector('h1', text: 'Cost Reports') + expect(page).to have_selector('.breadcrumb', text: 'Cost Reports') # to make sure we're not seeing the project cost reports: expect(page).not_to have_text('Ponyo')