diff options
Diffstat (limited to 'spec/features/nav')
-rw-r--r-- | spec/features/nav/top_nav_responsive_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/nav/top_nav_tooltip_spec.rb | 24 |
2 files changed, 25 insertions, 1 deletions
diff --git a/spec/features/nav/top_nav_responsive_spec.rb b/spec/features/nav/top_nav_responsive_spec.rb index 5c6a12a37a3..d571327e4b5 100644 --- a/spec/features/nav/top_nav_responsive_spec.rb +++ b/spec/features/nav/top_nav_responsive_spec.rb @@ -41,7 +41,7 @@ RSpec.describe 'top nav responsive', :js do end it 'has new dropdown', :aggregate_failures do - click_button('New...') + click_button('Create new') expect(page).to have_link('New project', href: new_project_path) expect(page).to have_link('New group', href: new_group_path) diff --git a/spec/features/nav/top_nav_tooltip_spec.rb b/spec/features/nav/top_nav_tooltip_spec.rb new file mode 100644 index 00000000000..58bfe1caf65 --- /dev/null +++ b/spec/features/nav/top_nav_tooltip_spec.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'top nav tooltips', :js do + let_it_be(:user) { create(:user) } + + before do + sign_in(user) + visit explore_projects_path + end + + it 'clicking new dropdown hides tooltip', :aggregate_failures do + btn = '#js-onboarding-new-project-link' + + page.find(btn).hover + + expect(page).to have_content('Create new') + + page.find(btn).click + + expect(page).not_to have_content('Create new') + end +end |