Refactor check mentions for xss test

The refactor consists in:
- Better scopping preconditions and the test definition
- Removing a variable that was being used in a single palce, and
use the string directly instead.
This commit is contained in:
Walmyr Lima 2019-07-18 18:50:58 +02:00
parent 9967b2d1ee
commit 3bded60397
1 changed files with 4 additions and 4 deletions

View File

@ -3,9 +3,7 @@
module QA
context 'Plan' do
describe 'check xss occurence in @mentions in issues' do
let(:issue_title) { 'issue title' }
it 'user mentions a user in comment' do
before do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform(&:sign_in_using_credentials)
@ -25,11 +23,13 @@ module QA
end
issue = Resource::Issue.fabricate_via_api! do |issue|
issue.title = issue_title
issue.title = 'issue title'
issue.project = project
end
issue.visit!
end
it 'user mentions a user in comment' do
Page::Project::Issue::Show.perform do |show_page|
show_page.select_all_activities_filter
show_page.comment('cc-ing you here @eve')