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 | 39 |
1 files changed, 30 insertions, 9 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 527442d5339..49245218e81 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 @@ -9,21 +9,42 @@ RSpec.describe 'User views issue designs', :js do let_it_be(:issue) { create(:issue, project: project) } let_it_be(:design) { create(:design, :with_file, issue: issue) } - before do - enable_design_management + context 'design_management_moved flag disabled' do + before do + enable_design_management + stub_feature_flags(design_management_moved: false) - visit project_issue_path(project, issue) + visit project_issue_path(project, issue) - click_link 'Designs' + click_link 'Designs' + end + + it 'opens design detail' do + click_link design.filename + + page.within(find('.js-design-header')) do + expect(page).to have_content(design.filename) + end + + expect(page).to have_selector('.js-design-image') + end end - it 'opens design detail' do - click_link design.filename + context 'design_management_moved flag enabled' do + before do + enable_design_management - page.within(find('.js-design-header')) do - expect(page).to have_content(design.filename) + visit project_issue_path(project, issue) end - expect(page).to have_selector('.js-design-image') + it 'opens design detail' do + click_link design.filename + + page.within(find('.js-design-header')) do + expect(page).to have_content(design.filename) + end + + expect(page).to have_selector('.js-design-image') + end end end |