Commit ab10dbac authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'qa/refactor-check-mentions-for-xss-spec' into 'master'

Refactor check mentions for xss test

See merge request gitlab-org/gitlab-ce!30914
parents 11d48d8d 3bded603
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
module QA module QA
context 'Plan' do context 'Plan' do
describe 'check xss occurence in @mentions in issues' do describe 'check xss occurence in @mentions in issues' do
let(:issue_title) { 'issue title' } before do
it 'user mentions a user in comment' do
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials) Page::Main::Login.perform(&:sign_in_using_credentials)
...@@ -25,11 +23,13 @@ module QA ...@@ -25,11 +23,13 @@ module QA
end end
issue = Resource::Issue.fabricate_via_api! do |issue| issue = Resource::Issue.fabricate_via_api! do |issue|
issue.title = issue_title issue.title = 'issue title'
issue.project = project issue.project = project
end end
issue.visit! issue.visit!
end
it 'user mentions a user in comment' do
Page::Project::Issue::Show.perform do |show_page| Page::Project::Issue::Show.perform do |show_page|
show_page.select_all_activities_filter show_page.select_all_activities_filter
show_page.comment('cc-ing you here @eve') show_page.comment('cc-ing you here @eve')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment