Welcome to mirror list, hosted at ThFree Co, Russian Federation.

whats_new_spec.rb « features « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7c5625486f5d78faeb21aa8178fdf2e82ccc4a17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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