summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanad Liaquat <sliaquat@gitlab.com>2019-07-30 10:54:56 +0500
committerSanad Liaquat <sliaquat@gitlab.com>2019-07-30 10:54:56 +0500
commit751cca3903154e973cbe6ba1dbe609c827dd53e7 (patch)
tree127611a4b85f1c15bc131b1ac35bbf6a433d3f27
parentf4b2d8b971cd53fb45ed1ad69f5b4a0f280331f7 (diff)
downloadgitlab-ce-751cca3903154e973cbe6ba1dbe609c827dd53e7.tar.gz
Test screenshots in before block
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb6
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb17
2 files changed, 21 insertions, 2 deletions
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
index 70c03e10449..bdff7ef324a 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb
@@ -3,7 +3,7 @@
module QA
context 'Plan' do
describe 'check xss occurence in @mentions in issues' do
- it 'user mentions a user in comment' do
+ before do
QA::Runtime::Env.personal_access_token = QA::Runtime::Env.admin_personal_access_token
unless QA::Runtime::Env.personal_access_token
@@ -22,6 +22,8 @@ module QA
Runtime::Browser.visit(:gitlab, Page::Main::Login)
+ expect(false).to eq(true)
+
Page::Main::Login.perform(&:sign_in_using_credentials)
project = Resource::Project.fabricate_via_api! do |resource|
@@ -39,7 +41,9 @@ module QA
issue.project = project
end
issue.visit!
+ end
+ it 'user mentions a user in comment' do
Page::Project::Issue::Show.perform do |show|
show.select_all_activities_filter
show.comment('cc-ing you here @eve')
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb
index 0b1bd00ac8d..1f81c710d39 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb
@@ -6,7 +6,7 @@ module QA
before do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
-
+ expect(false).to eq(true)
issue = Resource::Issue.fabricate_via_api! do |issue|
issue.title = 'issue title'
end
@@ -23,6 +23,21 @@ module QA
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)