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

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

require 'spec_helper'

RSpec.describe 'Issues > Real-time sidebar', :js do
  let_it_be(:project) { create(:project, :public) }
  let_it_be(:issue) { create(:issue, project: project) }
  let_it_be(:user) { create(:user) }

  before_all do
    project.add_developer(user)
  end

  it 'updates the assignee in real-time' do
    Capybara::Session.new(:other_session)

    using_session :other_session do
      visit project_issue_path(project, issue)
      expect(page.find('.assignee')).to have_content 'None'
    end

    gitlab_sign_in(user)
    visit project_issue_path(project, issue)
    expect(page.find('.assignee')).to have_content 'None'

    click_button 'assign yourself'

    using_session :other_session do
      expect(page.find('.assignee')).to have_content user.name
    end
  end
end