summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-12-07 15:03:50 +0100
committerMarin Jankovski <maxlazio@gmail.com>2015-12-07 15:03:50 +0100
commite53b350cb6db7438c1a50c500b324fd87afc41c4 (patch)
tree61626047bbb7c248e1e245dc9dde291a9ae65b5a /features
parentb2c4675cb0e681027334e5bd046451d3116924c8 (diff)
downloadgitlab-ce-e53b350cb6db7438c1a50c500b324fd87afc41c4.tar.gz
Add specs for showing lfs object in UI.
Diffstat (limited to 'features')
-rw-r--r--features/project/source/browse_files.feature6
-rw-r--r--features/steps/project/source/browse_files.rb26
2 files changed, 32 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 ceab23b9a4d..2edbca9b7fe 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -305,6 +305,32 @@ 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
+ 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