summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-09-06 17:20:28 +0000
committerRémy Coutable <remy@rymai.me>2018-09-06 17:20:28 +0000
commitdd6604027411c407b675be52285b158fa9f0bf89 (patch)
tree7a0f3c7fac9871008e890cf7b40a8a451757ccce /spec/features
parent2ab67aeb51e13c8fd0f815bdd77d28e168f0a2ea (diff)
parenteea1b88547bb038b34b0691f0280d54d5dd23947 (diff)
downloadgitlab-ce-dd6604027411c407b675be52285b158fa9f0bf89.tar.gz
Merge branch '43140-reduce-logs-tree-load' into 'master'51201-document-review-apps
Bulk-render commit titles in the tree view to improve performance Closes #43140 See merge request gitlab-org/gitlab-ce!21500
Diffstat (limited to 'spec/features')
-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