From e53b350cb6db7438c1a50c500b324fd87afc41c4 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Mon, 7 Dec 2015 15:03:50 +0100 Subject: Add specs for showing lfs object in UI. --- features/steps/project/source/browse_files.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'features/steps') 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 -- cgit v1.2.1 From 9bf51ae47d344c5939f275bb5ae429023456d30e Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Tue, 8 Dec 2015 10:58:15 +0100 Subject: Fix specs caused by update of gitlab-test repo. --- features/steps/project/source/browse_files.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'features/steps') diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 2edbca9b7fe..02d46e28237 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -306,6 +306,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps 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" -- cgit v1.2.1