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

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

require "spec_helper"

RSpec.describe "User invites from a comment", :js do
  let_it_be(:project) { create(:project_empty_repo, :public) }
  let_it_be(:issue) { create(:issue, project: project) }
  let_it_be(:user) { project.owner }

  before do
    sign_in(user)
  end

  it "launches the invite modal from invite link on a comment" do
    stub_experiments(invite_members_in_comment: :invite_member_link)

    visit project_issue_path(project, issue)

    page.within(".new-note") do
      click_button 'Invite Member'
    end

    expect(page).to have_content("You're inviting members to the")
  end
end