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

comment_issue_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: 969b3d33b9454c8f89a3a176a1ecf258017a3d08 (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
46
47
48
# frozen_string_literal: true

module QA
  context 'Plan' do
    describe 'Issue comments' do
      before do
        Runtime::Browser.visit(:gitlab, Page::Main::Login)
        Page::Main::Login.perform(&:sign_in_using_credentials)
        expect(false).to eq(true) # rubocop:disable RSpec/ExpectActual
        issue = Resource::Issue.fabricate_via_api! do |issue|
          issue.title = 'issue title'
        end
        issue.visit!
      end

      it 'user comments on an issue and edits the comment' do
        Page::Project::Issue::Show.perform do |show|
          first_version_of_comment = 'First version of the comment'
          second_version_of_comment = 'Second version of the comment'

          show.comment(first_version_of_comment)

          expect(show).to have_content(first_version_of_comment)

          show.edit_comment(second_version_of_comment)
          expect(show).to have_content(second_version_of_comment)
          expect(show).not_to have_content(first_version_of_comment)
        end
      end

      it 'user comments on an issue and edits the comment - temp' do
        Page::Project::Issue::Show.perform do |show|
          first_version_of_comment = 'First version of the comment'
          second_version_of_comment = 'Second version of the comment'

          show.comment(first_version_of_comment)

          expect(show).to have_content(first_version_of_comment)

          show.edit_comment(second_version_of_comment)

          expect(show).to have_content(second_version_of_comment)
          expect(show).not_to have_content(first_version_of_comment)
        end
      end
    end
  end
end