summaryrefslogtreecommitdiff
path: root/qa/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb
blob: f97b0e56ca297db59857a8dd33e85c1210447057 (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
# frozen_string_literal: true

module QA
  # Failure issue: https://gitlab.com/gitlab-org/quality/staging/issues/53
  context 'Plan', :quarantine do
    describe 'issue suggestions' do
      let(:issue_title) { 'Issue Lists are awesome' }

      it 'user sees issue suggestions when creating a new issue' do
        Runtime::Browser.visit(:gitlab, Page::Main::Login)
        Page::Main::Login.perform(&:sign_in_using_credentials)

        project = Resource::Project.fabricate! do |resource|
          resource.name = 'project-for-issue-suggestions'
          resource.description = 'project for issue suggestions'
        end

        Resource::Issue.fabricate! do |issue|
          issue.title = issue_title
          issue.project = project
        end

        project.visit!

        Page::Project::Show.perform(&:go_to_new_issue)
        Page::Project::Issue::New.perform do |new_issue_page|
          new_issue_page.add_title("issue")
          expect(new_issue_page).to have_content(issue_title)

          new_issue_page.add_title("Issue Board")
          expect(new_issue_page).not_to have_content(issue_title)
        end
      end
    end
  end
end