diff options
Diffstat (limited to 'qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb')
-rw-r--r-- | qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb index 04ae4963d3a..254efb741b3 100644 --- a/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb +++ b/qa/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb @@ -6,23 +6,25 @@ module QA let(:issue_title) { 'issue title' } before do - Runtime::Browser.visit(:gitlab, Page::Main::Login) - Page::Main::Login.perform(&:sign_in_using_credentials) + Flow::Login.sign_in end it 'user creates an issue' do - Resource::Issue.fabricate_via_browser_ui! do |issue| + issue = Resource::Issue.fabricate_via_browser_ui! do |issue| issue.title = issue_title end Page::Project::Menu.perform(&:click_issues) - expect(page).to have_content(issue_title) + Page::Project::Issue::Index.perform do |index| + expect(index).to have_issue(issue) + end end context 'when using attachments in comments', :object_storage do + let(:gif_file_name) { 'banana_sample.gif' } let(:file_to_attach) do - File.absolute_path(File.join('spec', 'fixtures', 'banana_sample.gif')) + File.absolute_path(File.join('spec', 'fixtures', gif_file_name)) end before do @@ -37,15 +39,7 @@ module QA Page::Project::Issue::Show.perform do |show| show.comment('See attached banana for scale', attachment: file_to_attach) - show.refresh - - image_url = find('a[href$="banana_sample.gif"]')[:href] - - found = show.wait(reload: false) do - show.asset_exists?(image_url) - end - - expect(found).to be_truthy + expect(show.noteable_note_item.find("img[src$='#{gif_file_name}']")).to be_visible end end end |