diff options
Diffstat (limited to 'spec/features/projects/issues/design_management/user_views_design_spec.rb')
-rw-r--r-- | spec/features/projects/issues/design_management/user_views_design_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/projects/issues/design_management/user_views_design_spec.rb b/spec/features/projects/issues/design_management/user_views_design_spec.rb index 11c8bdda3ac..268c209cba1 100644 --- a/spec/features/projects/issues/design_management/user_views_design_spec.rb +++ b/spec/features/projects/issues/design_management/user_views_design_spec.rb @@ -24,4 +24,26 @@ RSpec.describe 'User views issue designs', :js, feature_category: :design_manage expect(page).to have_selector('.js-design-image') end + + context 'when svg file is loaded in design detail' do + let_it_be(:file) { Rails.root.join('spec/fixtures/svg_without_attr.svg') } + let_it_be(:design) { create(:design, :with_file, filename: 'svg_without_attr.svg', file: file, issue: issue) } + + before do + visit designs_project_issue_path( + project, + issue, + { vueroute: design.filename } + ) + wait_for_requests + end + + it 'check if svg is loading' do + expect(page).to have_selector( + ".js-design-image > img[alt='svg_without_attr.svg']", + count: 1, + visible: :hidden + ) + end + end end |