summaryrefslogtreecommitdiff
path: root/spec/features/projects/tree
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-09-04 13:51:02 +0100
committerNick Thomas <nick@gitlab.com>2018-09-06 12:28:56 +0100
commitd9833890cca2c8fb388cc020f626f9d2c09871a4 (patch)
treecc82691a5d13ee2e3f67bd3d026631bae983435d /spec/features/projects/tree
parent228d819b5761de1e2362952a9d0f08828c88424d (diff)
downloadgitlab-ce-d9833890cca2c8fb388cc020f626f9d2c09871a4.tar.gz
Bulk-render commit titles in the tree view to improve performance
Diffstat (limited to 'spec/features/projects/tree')
-rw-r--r--spec/features/projects/tree/tree_show_spec.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/features/projects/tree/tree_show_spec.rb b/spec/features/projects/tree/tree_show_spec.rb
index 8ae036cd29f..45e81e1c040 100644
--- a/spec/features/projects/tree/tree_show_spec.rb
+++ b/spec/features/projects/tree/tree_show_spec.rb
@@ -4,16 +4,30 @@ describe 'Projects tree', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
+ # This commit has a known state on the master branch of gitlab-test
+ let(:test_sha) { '7975be0116940bf2ad4321f79d02a55c5f7779aa' }
+
before do
project.add_maintainer(user)
sign_in(user)
end
it 'renders tree table without errors' do
- visit project_tree_path(project, 'master')
+ visit project_tree_path(project, test_sha)
+ wait_for_requests
+
+ expect(page).to have_selector('.tree-item')
+ expect(page).to have_content('add tests for .gitattributes custom highlighting')
+ expect(page).not_to have_selector('.flash-alert')
+ expect(page).not_to have_selector('.label-lfs', text: 'LFS')
+ end
+
+ it 'renders tree table for a subtree without errors' do
+ visit project_tree_path(project, File.join(test_sha, 'files'))
wait_for_requests
expect(page).to have_selector('.tree-item')
+ expect(page).to have_content('add spaces in whitespace file')
expect(page).not_to have_selector('.label-lfs', text: 'LFS')
expect(page).not_to have_selector('.flash-alert')
end