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
40f1bc48
Commit
40f1bc48
authored
Apr 28, 2021
by
Samantha Ming
Committed by
Mark Lapierre
Apr 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature spec to cover ref switch of similar name
parent
2d4659e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
spec/features/projects/blobs/blob_show_spec.rb
spec/features/projects/blobs/blob_show_spec.rb
+22
-0
No files found.
spec/features/projects/blobs/blob_show_spec.rb
View file @
40f1bc48
...
...
@@ -125,6 +125,7 @@ RSpec.describe 'File blob', :js do
page
.
within
'.project-refs-form'
do
click_link
ref_name
wait_for_requests
end
end
...
...
@@ -170,6 +171,27 @@ RSpec.describe 'File blob', :js do
expect
(
page
).
not_to
have_css
(
'.hll'
)
end
end
context
'sucessfully change ref of similar name'
do
before
do
project
.
repository
.
create_branch
(
'dev'
)
project
.
repository
.
create_branch
(
'development'
)
end
it
'switch ref from longer to shorter ref name'
do
visit_blob
(
'files/js/application.js'
,
ref:
'development'
)
switch_ref_to
(
'dev'
)
expect
(
page
.
find
(
'.file-title-name'
).
text
).
to
eq
(
'application.js'
)
end
it
'switch ref from shorter to longer ref name'
do
visit_blob
(
'files/js/application.js'
,
ref:
'dev'
)
switch_ref_to
(
'development'
)
expect
(
page
.
find
(
'.file-title-name'
).
text
).
to
eq
(
'application.js'
)
end
end
end
context
'visiting with a line number anchor'
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