diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-16 15:10:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-16 15:10:54 +0300 |
commit | f01d3c8c095e70981ffc1d20c050c153f3766421 (patch) | |
tree | 1f072a51c12791df3847fd90bd8e6a369631e990 /spec/features/expand_collapse_diffs_spec.rb | |
parent | cb20cd86e45ad06b0dc43562c0a1121c3e505c36 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/expand_collapse_diffs_spec.rb')
-rw-r--r-- | spec/features/expand_collapse_diffs_spec.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/spec/features/expand_collapse_diffs_spec.rb b/spec/features/expand_collapse_diffs_spec.rb index 1f09b01ddec..43dd80187ce 100644 --- a/spec/features/expand_collapse_diffs_spec.rb +++ b/spec/features/expand_collapse_diffs_spec.rb @@ -19,6 +19,8 @@ RSpec.describe 'Expand and collapse diffs', :js, feature_category: :source_code_ # Ensure that undiffable.md is in .gitattributes project.repository.copy_gitattributes(branch) visit project_commit_path(project, project.commit(branch)) + + wait_for_requests end def file_container(filename) @@ -222,10 +224,16 @@ RSpec.describe 'Expand and collapse diffs', :js, feature_category: :source_code_ let(:branch) { 'expand-collapse-files' } # safe-files -> 100 | safe-lines -> 5000 | commit-files -> 105 - it 'does collapsing from the safe number of files to the end on small files' do - expect(page).to have_link('Expand all') + it 'does collapsing from the safe number of files to the end on small files', :aggregate_failures do + expect(page).not_to have_link('Expand all') + expect(page).to have_selector('.diff-content', count: 20) + expect(page).to have_selector('.diff-collapsed', count: 0) - expect(page).to have_selector('.diff-content', count: 105) + visit project_commit_path(project, project.commit(branch), page: 6) + wait_for_requests + + expect(page).to have_link('Expand all') + expect(page).to have_selector('.diff-content', count: 5) expect(page).to have_selector('.diff-collapsed', count: 5) %w(file-95.txt file-96.txt file-97.txt file-98.txt file-99.txt).each do |filename| |