diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-10-04 11:32:56 -0500 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-10-04 11:34:19 -0500 |
commit | 690971c23b293babf654c9c56a72c4d222ea6cc9 (patch) | |
tree | 2dbb5598b9f4eaa50569fa82f1f2a257be4d7116 | |
parent | ace2064a49c09d25f8067050de29640596e0b0f8 (diff) | |
download | gitlab-ce-690971c23b293babf654c9c56a72c4d222ea6cc9.tar.gz |
Add extra assertions about how the link will open
-rw-r--r-- | spec/features/projects/artifacts/browse_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/features/projects/artifacts/browse_spec.rb b/spec/features/projects/artifacts/browse_spec.rb index 1bfdf3c2727..fe485334192 100644 --- a/spec/features/projects/artifacts/browse_spec.rb +++ b/spec/features/projects/artifacts/browse_spec.rb @@ -35,7 +35,10 @@ feature 'Browse artifact', :js do it "shows external link icon and styles" do link = first('.tree-item-file-external-link') - expect(link).to have_content('doc_sample.txt') + expect(page).to have_link('doc_sample.txt', href: file_project_job_artifacts_path(project, job, path: txt_entry.blob.path)) + expect(link[:target]).to eq('_blank') + expect(link[:rel]).to include('noopener') + expect(link[:rel]).to include('noreferrer') expect(page).to have_selector('.js-artifact-tree-external-icon') end end |