Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/compare_spec.rb')
-rw-r--r--spec/features/projects/compare_spec.rb19
1 files changed, 16 insertions, 3 deletions
diff --git a/spec/features/projects/compare_spec.rb b/spec/features/projects/compare_spec.rb
index 8284299443f..4c13d23559b 100644
--- a/spec/features/projects/compare_spec.rb
+++ b/spec/features/projects/compare_spec.rb
@@ -11,7 +11,7 @@ RSpec.describe "Compare", :js, feature_category: :projects do
sign_in user
end
- describe "branches" do
+ shared_examples "compare view of branches" do
shared_examples 'compares branches' do
it 'compares branches' do
visit project_compare_index_path(project, from: 'master', to: 'master')
@@ -114,7 +114,7 @@ RSpec.describe "Compare", :js, feature_category: :projects do
click_button('Compare')
page.within('[data-testid="too-many-changes-alert"]') do
- expect(page).to have_text("Too many changes to show. To preserve performance only 3 of 3+ files are displayed.")
+ expect(page).to have_text("Some changes are not shown. For a faster browsing experience, only 3 of 3+ files are shown. Download one of the files below to see all changes.")
end
end
end
@@ -148,7 +148,7 @@ RSpec.describe "Compare", :js, feature_category: :projects do
end
end
- describe "tags" do
+ shared_examples "compare view of tags" do
it "compares tags" do
visit project_compare_index_path(project, from: "master", to: "master")
@@ -182,4 +182,17 @@ RSpec.describe "Compare", :js, feature_category: :projects do
dropdown.all(".js-compare-#{dropdown_type}-dropdown .dropdown-item", text: selection).first.click
end
end
+
+ it_behaves_like "compare view of branches"
+ it_behaves_like "compare view of tags"
+
+ context "when super sidebar is enabled" do
+ before do
+ user.update!(use_new_navigation: true)
+ stub_feature_flags(super_sidebar_nav: true)
+ end
+
+ it_behaves_like "compare view of branches"
+ it_behaves_like "compare view of tags"
+ end
end