summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-08 16:18:18 +0100
committerDouwe Maan <douwe@gitlab.com>2015-12-08 16:18:18 +0100
commitf39ff54290abe224b0b79accc0da48c1cd2d2109 (patch)
tree303854f6a649364c539e72fd6665bdca3530540f /features
parentb2b548de9d74b01816baca822d39f9dd543bbbf7 (diff)
parent792f2bbe0b306bda266dfc817edf33b4c9e36a0f (diff)
downloadgitlab-ce-f39ff54290abe224b0b79accc0da48c1cd2d2109.tar.gz
Merge branch 'master' into zj/gitlab-ce-merge-if-green
Diffstat (limited to 'features')
-rw-r--r--features/project/source/browse_files.feature6
-rw-r--r--features/steps/project/source/browse_files.rb27
2 files changed, 33 insertions, 0 deletions
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature
index e545ea63ca8..37f99b37619 100644
--- a/features/project/source/browse_files.feature
+++ b/features/project/source/browse_files.feature
@@ -221,3 +221,9 @@ Feature: Project Source Browse Files
Given I switch ref to fix
And I visit the fix tree
Then I see the commit data for a directory with a leading dot
+
+ Scenario: I browse LFS object
+ Given I click on "files/lfs/lfs_object.iso" file in repo
+ Then I should see download link and object size
+ And I should not see lfs pointer details
+ And I should see buttons for allowed commands
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index 05d1346d006..2792174cc93 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -305,6 +305,33 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
expect(page).not_to have_content('Loading commit data...')
end
+ step 'I click on "files/lfs/lfs_object.iso" file in repo' do
+ visit namespace_project_tree_path(@project.namespace, @project, "lfs")
+ click_link 'files'
+ click_link "lfs"
+ click_link "lfs_object.iso"
+ end
+
+ step 'I should see download link and object size' do
+ expect(page).to have_content 'Download (1.5 MB)'
+ end
+
+ step 'I should not see lfs pointer details' do
+ expect(page).not_to have_content 'version https://git-lfs.github.com/spec/v1'
+ expect(page).not_to have_content 'oid sha256:91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897'
+ expect(page).not_to have_content 'size 1575078'
+ end
+
+ step 'I should see buttons for allowed commands' do
+ expect(page).to have_content 'Raw'
+ expect(page).to have_content 'History'
+ expect(page).to have_content 'Permalink'
+ expect(page).not_to have_content 'Edit'
+ expect(page).not_to have_content 'Blame'
+ expect(page).not_to have_content 'Delete'
+ expect(page).not_to have_content 'Replace'
+ end
+
private
def set_new_content