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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 18:08:44 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 18:08:44 +0300
commitbcc77054ee9aefd1e332e04a4189390fd5a3112e (patch)
treee6e1908c310e4733038794e932196cae0d66ba9a /spec/features/issues
parent05b5c609cb8c260b10c2eb1b92b711dc82d32c3f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/issues')
-rw-r--r--spec/features/issues/issue_detail_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/features/issues/issue_detail_spec.rb b/spec/features/issues/issue_detail_spec.rb
index a1b53718577..0d24b02a64c 100644
--- a/spec/features/issues/issue_detail_spec.rb
+++ b/spec/features/issues/issue_detail_spec.rb
@@ -23,16 +23,18 @@ describe 'Issue Detail', :js do
context 'when issue description has xss snippet' do
before do
issue.update!(description: '![xss" onload=alert(1);//](a)')
+
sign_in(user)
visit project_issue_path(project, issue)
- wait_for_requests
end
it 'encodes the description to prevent xss issues' do
page.within('.issuable-details .detail-page-description') do
+ image = find('img.js-lazy-loaded')
+
expect(page).to have_selector('img', count: 1)
- expect(find('img')['onerror']).to be_nil
- expect(find('img')['src']).to end_with('/a')
+ expect(image['onerror']).to be_nil
+ expect(image['src']).to end_with('/a')
end
end
end