2019-07-10 13:51:16 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module QA
|
2022-10-21 21:10:20 +00:00
|
|
|
RSpec.describe 'Plan', :reliable, product_group: :project_management do
|
2019-07-10 13:51:16 +00:00
|
|
|
describe 'Issue comments' do
|
2019-07-18 13:18:29 +00:00
|
|
|
before do
|
2019-11-18 21:06:19 +00:00
|
|
|
Flow::Login.sign_in
|
2019-07-10 13:51:16 +00:00
|
|
|
|
2020-01-16 00:08:32 +00:00
|
|
|
Resource::Issue.fabricate_via_api!.visit!
|
2019-07-18 13:18:29 +00:00
|
|
|
end
|
2019-07-10 13:51:16 +00:00
|
|
|
|
2021-12-13 21:14:32 +00:00
|
|
|
it 'comments on an issue and edits the comment', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347978' do
|
2019-07-19 19:49:37 +00:00
|
|
|
Page::Project::Issue::Show.perform do |show|
|
2019-07-10 13:51:16 +00:00
|
|
|
first_version_of_comment = 'First version of the comment'
|
|
|
|
second_version_of_comment = 'Second version of the comment'
|
|
|
|
|
2019-07-19 19:49:37 +00:00
|
|
|
show.comment(first_version_of_comment)
|
2019-07-10 13:51:16 +00:00
|
|
|
|
2020-11-04 06:09:13 +00:00
|
|
|
expect(show).to have_comment(first_version_of_comment)
|
2019-07-10 13:51:16 +00:00
|
|
|
|
2019-07-19 19:49:37 +00:00
|
|
|
show.edit_comment(second_version_of_comment)
|
2019-07-10 13:51:16 +00:00
|
|
|
|
2020-11-04 06:09:13 +00:00
|
|
|
expect(show).to have_comment(second_version_of_comment)
|
2019-07-19 19:49:37 +00:00
|
|
|
expect(show).not_to have_content(first_version_of_comment)
|
2019-07-10 13:51:16 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|