Commit 3b685cc9 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch...

Merge branch '204732-transient-failure-in-spec-features-issues-issue_detail_spec-rb-31-issue-detail-when-issue' into 'master'

Fix flaky spec in `spec/features/issues/issue_detail_spec.rb:31`

Closes #204732

See merge request gitlab-org/gitlab!24839
parents 6df5125f e7f83ecf
......@@ -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
......
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