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

broadcast_messages_spec.rb « features « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 43fbf1010c924b73f92099babd2fa3ec4b0b22c2 (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
# frozen_string_literal: true

require 'spec_helper'

describe 'Broadcast Messages' do
  let!(:broadcast_message) { create(:broadcast_message, broadcast_type: 'notification', message: 'SampleMessage') }

  it 'shows broadcast message' do
    visit root_path

    expect(page).to have_content 'SampleMessage'
  end

  it 'hides broadcast message after dismiss', :js do
    visit root_path

    find('.js-dismiss-current-broadcast-notification').click

    expect(page).not_to have_content 'SampleMessage'
  end

  it 'broadcast message is still hidden after refresh', :js do
    visit root_path

    find('.js-dismiss-current-broadcast-notification').click
    visit root_path

    expect(page).not_to have_content 'SampleMessage'
  end
end