From 7e7e52536b876a9381c6efb4d858d3a49d1f9640 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 21 Aug 2018 11:21:33 +0200 Subject: Refresh issue / show page to verify attachments --- qa/qa/specs/features/project/create_issue_spec.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'qa') diff --git a/qa/qa/specs/features/project/create_issue_spec.rb b/qa/qa/specs/features/project/create_issue_spec.rb index eee7d01a4c8..bd3e8d2c666 100644 --- a/qa/qa/specs/features/project/create_issue_spec.rb +++ b/qa/qa/specs/features/project/create_issue_spec.rb @@ -19,20 +19,21 @@ module QA expect(page).to have_content(issue_title) end - describe 'with attachments', :object_storage do - let(:file_to_attach) { File.absolute_path(File.join('spec', 'fixtures', 'banana_sample.gif')) } + context 'when using attachements in comments', :object_storage do + let(:file_to_attach) do + File.absolute_path(File.join('spec', 'fixtures', 'banana_sample.gif')) + end it 'user comments on an issue with an attachment' do create_issue Page::Project::Issue::Show.perform do |show| show.comment('See attached banana for scale', attachment: file_to_attach) - end - image_url = find('a[href$="banana_sample.gif"]')[:href] + show.refresh + + image_url = find('a[href$="banana_sample.gif"]')[:href] - Page::Project::Issue::Show.perform do |show| - # Wait for attachment to upload found = show.wait(reload: false) do show.asset_exists?(image_url) end -- cgit v1.2.3