diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-21 12:08:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-21 12:08:52 +0300 |
commit | ea037b91577f1b645267df9e034f6da3e389626c (patch) | |
tree | 4cf78baf7034278157a4faa9d37409b0cf299a24 /spec/features/whats_new_spec.rb | |
parent | 25c07d7230471a8cc7062e83662a300fb4902fce (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/whats_new_spec.rb')
-rw-r--r-- | spec/features/whats_new_spec.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/features/whats_new_spec.rb b/spec/features/whats_new_spec.rb new file mode 100644 index 00000000000..7c5625486f5 --- /dev/null +++ b/spec/features/whats_new_spec.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +require "spec_helper" + +RSpec.describe "renders a `whats new` dropdown item", :js do + let_it_be(:user) { create(:user) } + + before do + sign_in(user) + end + + it 'shows notification dot and count and removes it once viewed' do + visit root_dashboard_path + + page.within '.header-help' do + expect(page).to have_selector('.notification-dot', visible: true) + + find('.header-help-dropdown-toggle').click + + expect(page).to have_button(text: "What's new") + expect(page).to have_selector('.js-whats-new-notification-count') + + find('button', text: "What's new").click + end + + find('.whats-new-drawer .gl-drawer-close-button').click + find('.header-help-dropdown-toggle').click + + page.within '.header-help' do + expect(page).not_to have_selector('.notification-dot', visible: true) + expect(page).to have_button(text: "What's new") + expect(page).not_to have_selector('.js-whats-new-notification-count') + end + end +end |