Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
eee39950
Commit
eee39950
authored
Apr 19, 2021
by
Aleksei Lipniagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature test on pagination
parent
f12167ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
spec/features/projects/compare_spec.rb
spec/features/projects/compare_spec.rb
+28
-0
No files found.
spec/features/projects/compare_spec.rb
View file @
eee39950
...
...
@@ -118,6 +118,34 @@ RSpec.describe "Compare", :js do
end
end
end
context
"pagination"
do
before
do
stub_const
(
"Projects::CompareController::COMMIT_DIFFS_PER_PAGE"
,
1
)
end
it
"shows an adjusted count for changed files on this page"
do
visit
project_compare_index_path
(
project
,
from:
"feature"
,
to:
"master"
)
click_button
(
'Compare'
)
expect
(
page
).
to
have_content
(
"Showing 1 changed file"
)
end
it
"shows commits list only on the first page"
do
visit
project_compare_index_path
(
project
,
from:
"feature"
,
to:
"master"
)
click_button
(
'Compare'
)
expect
(
page
).
to
have_content
'Commits (29)'
# go to the second page
within
(
".files .gl-pagination"
)
do
click_on
(
"2"
)
end
expect
(
page
).
not_to
have_content
'Commits (29)'
end
end
end
describe
"tags"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment