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

module QA
  context 'Plan' do
    describe 'filter issue comments activities' do
      let(:issue_title) { 'issue title' }

      it 'user filters comments and activites in an issue' do
        Runtime::Browser.visit(:gitlab, Page::Main::Login)
        Page::Main::Login.act { sign_in_using_credentials }

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

        expect(page).to have_content(issue_title)

        Page::Project::Issue::Show.perform do |show_page|
          show_page.select_comments_only_filter
          show_page.comment('/confidential')
          show_page.comment('My own comment')

          expect(show_page).not_to have_content("made the issue confidential")
          expect(show_page).to have_content("My own comment")

          show_page.select_all_activities_filter

          expect(show_page).to have_content("made the issue confidential")
          expect(show_page).to have_content("My own comment")
        end
      end
    end
  end
end