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

related_issues_spec.rb « related_issues « 2_plan « browser_ui « features « specs « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 85011415177be1f9ee67aac5471f815aa52e6bfc (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
36
37
38
39
40
41
42
43
44
45
# frozen_string_literal: true

module QA
  RSpec.describe 'Plan', :reliable do
    describe 'Related issues' do
      let(:project) do
        Resource::Project.fabricate_via_api! do |project|
          project.name = 'project-to-test-related-issues'
        end
      end

      let(:issue_1) do
        Resource::Issue.fabricate_via_api! do |issue|
          issue.project = project
        end
      end

      let(:issue_2) do
        Resource::Issue.fabricate_via_api! do |issue|
          issue.project = project
        end
      end

      before do
        Flow::Login.sign_in
      end

      it 'relates and unrelates one issue to/from another', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347994' do
        issue_1.visit!

        Page::Project::Issue::Show.perform do |show|
          max_wait = 60

          show.relate_issue(issue_2)

          expect(show.related_issuable_item).to have_text(issue_2.title, wait: max_wait)

          show.click_remove_related_issue_button

          expect(show).not_to have_text(issue_2.title, wait: max_wait)
        end
      end
    end
  end
end