From c13c1e1b166edd5520057814dc4698450b578c9a Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 4 Mar 2017 15:30:12 +0200 Subject: Improve explore projects spinach test Project name "Internal" is too generic and can lead to false positive/negative when there is a visibility filter on the page. So we ensure we check for project inside list holder css class. Signed-off-by: Dmitriy Zaporozhets --- features/steps/shared/project.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'features/steps/shared/project.rb') diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb index dae248b8b7e..345a28f27dc 100644 --- a/features/steps/shared/project.rb +++ b/features/steps/shared/project.rb @@ -166,11 +166,15 @@ module SharedProject end step 'I should see project "Internal"' do - expect(page).to have_content "Internal" + page.within '.js-projects-list-holder' do + expect(page).to have_content "Internal" + end end step 'I should not see project "Internal"' do - expect(page).not_to have_content "Internal" + page.within '.js-projects-list-holder' do + expect(page).not_to have_content "Internal" + end end step 'public project "Community"' do -- cgit v1.2.1