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: fa779bd1f4e9b38050db8f4ffe18ca7a3f2b159f (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
# frozen_string_literal: true

module QA
  context 'Plan' do
    describe 'collapse comments in issue discussions' do
      let(:issue_title) { 'issue title' }

      it 'user collapses reply for comments in an issue' do
        Runtime::Browser.visit(:gitlab, Page::Main::Login)
        Page::Main::Login.perform(&: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_all_activities_filter
          show_page.start_discussion("My first discussion")
          expect(show_page).to have_content("My first discussion")

          show_page.reply_to_discussion("My First Reply")
          expect(show_page).to have_content("My First Reply")

          show_page.collapse_replies
          expect(show_page).to have_content("1 reply")
          expect(show_page).not_to have_content("My First Reply")

          show_page.expand_replies
          expect(show_page).to have_content("My First Reply")
          expect(show_page).not_to have_content("1 reply")
        end
      end
    end
  end
end