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

collapse_comments_in_discussions_spec.rb « issue « 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: 6ed204a98d47487a84a78f29c490b300ecd497f8 (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
# frozen_string_literal: true

module QA
  RSpec.describe 'Plan', :reliable do
    describe 'collapse comments in issue discussions' do
      let(:my_first_reply) { 'My first reply' }
      let(:one_reply) { '1 reply' }
      let(:issue) { Resource::Issue.fabricate_via_api! }

      before do
        Flow::Login.sign_in

        issue.visit!
      end

      it 'collapses and expands reply for comments in an issue', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/434' do
        Page::Project::Issue::Show.perform do |show|
          show.select_all_activities_filter
          show.start_discussion('My first discussion')
          show.reply_to_discussion(1, my_first_reply)

          show.collapse_replies
          expect(show).to have_content(one_reply)
          expect(show).not_to have_content(my_first_reply)

          show.expand_replies
          expect(show).to have_comment(my_first_reply)
          expect(show).not_to have_content(one_reply)
        end
      end
    end
  end
end