2016-10-27 16:08:20 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-04-20 19:01:47 -04:00
|
|
|
feature 'user browses project', feature: true, js: true do
|
2016-10-27 16:08:20 -04:00
|
|
|
let(:project) { create(:project) }
|
|
|
|
let(:user) { create(:user) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
project.team << [user, :master]
|
2017-06-05 14:51:54 -04:00
|
|
|
gitlab_sign_in(user)
|
2016-10-27 16:08:20 -04:00
|
|
|
visit namespace_project_tree_path(project.namespace, project, project.default_branch)
|
|
|
|
end
|
|
|
|
|
|
|
|
scenario "can see blame of '.gitignore'" do
|
|
|
|
click_link ".gitignore"
|
2017-06-22 20:07:19 -04:00
|
|
|
click_link 'Blame'
|
2017-04-20 19:01:47 -04:00
|
|
|
|
2016-10-27 16:08:20 -04:00
|
|
|
expect(page).to have_content "*.rb"
|
|
|
|
expect(page).to have_content "Dmitriy Zaporozhets"
|
|
|
|
expect(page).to have_content "Initial commit"
|
|
|
|
end
|
2017-03-07 12:57:30 -05:00
|
|
|
|
|
|
|
scenario 'can see raw content of LFS pointer with LFS disabled' do
|
|
|
|
allow_any_instance_of(Project).to receive(:lfs_enabled?).and_return(false)
|
|
|
|
click_link 'files'
|
|
|
|
click_link 'lfs'
|
|
|
|
click_link 'lfs_object.iso'
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2017-03-07 12:57:30 -05:00
|
|
|
|
|
|
|
expect(page).not_to have_content 'Download (1.5 MB)'
|
|
|
|
expect(page).to have_content 'version https://git-lfs.github.com/spec/v1'
|
|
|
|
expect(page).to have_content 'oid sha256:91eff75a492a3ed0dfcb544d7f31326bc4014c8551849c192fd1e48d4dd2c897'
|
|
|
|
expect(page).to have_content 'size 1575078'
|
|
|
|
end
|
2017-05-17 12:25:31 -04:00
|
|
|
|
|
|
|
scenario 'can see last commit for current directory' do
|
|
|
|
last_commit = project.repository.last_commit_for_path(project.default_branch, 'files')
|
|
|
|
|
|
|
|
click_link 'files'
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2017-05-17 12:25:31 -04:00
|
|
|
|
|
|
|
page.within('.blob-commit-info') do
|
|
|
|
expect(page).to have_content last_commit.short_id
|
|
|
|
expect(page).to have_content last_commit.author_name
|
|
|
|
end
|
|
|
|
end
|
2016-10-27 16:08:20 -04:00
|
|
|
end
|