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:32:56 -0500
commit8640b294faa1f2f99e72ec46d36ba4873d8d3f5b (patch)
treed245ed59b8359ec28add9325413b221585a5df3f
parentff4b8cdc812dd7ea462588a7189fc13ec5cb79aa (diff)
downloadgitlab-ce-8640b294faa1f2f99e72ec46d36ba4873d8d3f5b.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