summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-10-04 11:32:56 -0500
committerEric Eastwood <contact@ericeastwood.com>2017-10-04 11:34:19 -0500
commit690971c23b293babf654c9c56a72c4d222ea6cc9 (patch)
tree2dbb5598b9f4eaa50569fa82f1f2a257be4d7116
parentace2064a49c09d25f8067050de29640596e0b0f8 (diff)
downloadgitlab-ce-690971c23b293babf654c9c56a72c4d222ea6cc9.tar.gz
Add extra assertions about how the link will open
-rw-r--r--spec/features/projects/artifacts/browse_spec.rb5
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