summaryrefslogtreecommitdiff
path: root/spec/features/projects/blobs
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-04 00:10:03 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-04 00:10:03 +0000
commitc9ebdf468d0ffc669b2ac9c388730d6c3f2741a2 (patch)
treefa63d665aae06ac1a9bbeffb1426b5173baabe4e /spec/features/projects/blobs
parent8e2f50b44d51768c38d300a2ba2f9208107933b2 (diff)
downloadgitlab-ce-c9ebdf468d0ffc669b2ac9c388730d6c3f2741a2.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/projects/blobs')
-rw-r--r--spec/features/projects/blobs/blob_show_spec.rb22
1 files changed, 20 insertions, 2 deletions
diff --git a/spec/features/projects/blobs/blob_show_spec.rb b/spec/features/projects/blobs/blob_show_spec.rb
index 3598aa2f423..595304789a6 100644
--- a/spec/features/projects/blobs/blob_show_spec.rb
+++ b/spec/features/projects/blobs/blob_show_spec.rb
@@ -172,7 +172,7 @@ RSpec.describe 'File blob', :js do
end
end
- context 'sucessfully change ref of similar name' do
+ context 'successfully change ref of similar name' do
before do
project.repository.create_branch('dev')
project.repository.create_branch('development')
@@ -182,14 +182,32 @@ RSpec.describe 'File blob', :js do
visit_blob('files/js/application.js', ref: 'development')
switch_ref_to('dev')
- expect(page.find('.file-title-name').text).to eq('application.js')
+ aggregate_failures do
+ expect(page.find('.file-title-name').text).to eq('application.js')
+ expect(page).not_to have_css('flash-container')
+ end
end
it 'switch ref from shorter to longer ref name' do
visit_blob('files/js/application.js', ref: 'dev')
switch_ref_to('development')
+ aggregate_failures do
+ expect(page.find('.file-title-name').text).to eq('application.js')
+ expect(page).not_to have_css('flash-container')
+ end
+ end
+ end
+
+ it 'successfully changes ref when the ref name matches the project name' do
+ project.repository.create_branch(project.name)
+
+ visit_blob('files/js/application.js', ref: project.name)
+ switch_ref_to('master')
+
+ aggregate_failures do
expect(page.find('.file-title-name').text).to eq('application.js')
+ expect(page).not_to have_css('flash-container')
end
end
end