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

user_views_confluence_page_spec.rb « confluence « projects « features « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 49e7839f16c8492674711755f45140cbff93070d (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 'User views the Confluence page' do
  let_it_be(:user) { create(:user) }

  let(:project) { create(:project, :public) }

  before do
    sign_in(user)
  end

  it 'shows the page when the Confluence integration is enabled' do
    service = create(:confluence_integration, project: project)

    visit project_wikis_confluence_path(project)

    expect(page).to have_css('.nav-sidebar li.active', text: 'Confluence', match: :first)

    element = page.find('.row.empty-state')

    expect(element).to have_link('Go to Confluence', href: service.confluence_url)
    expect(element).to have_link('Confluence epic', href: 'https://gitlab.com/groups/gitlab-org/-/epics/3629')
  end

  it 'does not show the page when the Confluence integration disabled' do
    visit project_wikis_confluence_path(project)

    expect(page).to have_gitlab_http_status(:not_found)
  end
end