Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
7625bc732c
commit
c08ac104a1
|
@ -655,7 +655,6 @@ Layout/ArgumentAlignment:
|
|||
- 'spec/features/merge_request/user_sees_versions_spec.rb'
|
||||
- 'spec/features/merge_requests/user_lists_merge_requests_spec.rb'
|
||||
- 'spec/features/merge_requests/user_views_open_merge_requests_spec.rb'
|
||||
- 'spec/features/projects/branches_spec.rb'
|
||||
- 'spec/features/projects/commit/mini_pipeline_graph_spec.rb'
|
||||
- 'spec/features/projects/environments/environment_spec.rb'
|
||||
- 'spec/features/projects/environments/environments_spec.rb'
|
||||
|
|
|
@ -4011,7 +4011,6 @@ Layout/LineLength:
|
|||
- 'spec/features/projects/blobs/shortcuts_blob_spec.rb'
|
||||
- 'spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb'
|
||||
- 'spec/features/projects/blobs/user_views_pipeline_editor_button_spec.rb'
|
||||
- 'spec/features/projects/branches_spec.rb'
|
||||
- 'spec/features/projects/ci/editor_spec.rb'
|
||||
- 'spec/features/projects/commit/cherry_pick_spec.rb'
|
||||
- 'spec/features/projects/commit/user_reverts_commit_spec.rb'
|
||||
|
|
|
@ -1361,7 +1361,6 @@ RSpec/ContextWording:
|
|||
- 'spec/features/projects/blobs/blob_show_spec.rb'
|
||||
- 'spec/features/projects/blobs/edit_spec.rb'
|
||||
- 'spec/features/projects/branches/user_views_branches_spec.rb'
|
||||
- 'spec/features/projects/branches_spec.rb'
|
||||
- 'spec/features/projects/ci/lint_spec.rb'
|
||||
- 'spec/features/projects/clusters_spec.rb'
|
||||
- 'spec/features/projects/commit/comments/user_adds_comment_spec.rb'
|
||||
|
|
|
@ -50,7 +50,6 @@ Style/KeywordParametersOrder:
|
|||
- 'qa/qa/specs/features/ee/browser_ui/3_create/repository/file_locking_spec.rb'
|
||||
- 'qa/qa/specs/features/ee/browser_ui/3_create/repository/push_rules_spec.rb'
|
||||
- 'qa/spec/runtime/env_spec.rb'
|
||||
- 'spec/features/projects/branches_spec.rb'
|
||||
- 'spec/graphql/types/ci/pipeline_counts_type_spec.rb'
|
||||
- 'spec/lib/gitlab/background_migration/populate_vulnerability_reads_spec.rb'
|
||||
- 'spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb'
|
||||
|
|
|
@ -696,7 +696,6 @@ Style/PercentLiteralDelimiters:
|
|||
- 'spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb'
|
||||
- 'spec/features/projects/active_tabs_spec.rb'
|
||||
- 'spec/features/projects/artifacts/user_downloads_artifacts_spec.rb'
|
||||
- 'spec/features/projects/branches_spec.rb'
|
||||
- 'spec/features/projects/environments/environment_spec.rb'
|
||||
- 'spec/features/projects/integrations/user_activates_jira_spec.rb'
|
||||
- 'spec/features/projects/jobs_spec.rb'
|
||||
|
|
2
Gemfile
2
Gemfile
|
@ -370,7 +370,7 @@ group :development do
|
|||
gem 'solargraph', '~> 0.47.2', require: false
|
||||
|
||||
gem 'letter_opener_web', '~> 2.0.0'
|
||||
gem 'lookbook', '~> 1.0', '>= 1.0.8'
|
||||
gem 'lookbook', '~> 1.2', '>= 1.2.1'
|
||||
|
||||
# Better errors handler
|
||||
gem 'better_errors', '~> 2.9.1'
|
||||
|
|
|
@ -315,7 +315,7 @@
|
|||
{"name":"lockbox","version":"0.6.2","platform":"ruby","checksum":"0136677875c3d6e27cef87cd7bd66610404e2b3cd7f07f1ac8ed34e48f18dc3c"},
|
||||
{"name":"lograge","version":"0.11.2","platform":"ruby","checksum":"4cbd1554b86f545d795eff15a0c24fd25057d2ac4e1caa5fc186168b3da932ef"},
|
||||
{"name":"loofah","version":"2.19.0","platform":"ruby","checksum":"302791371f473611e342f9e469e7f2fbf1155bb1b3a978a83ac7df625298feba"},
|
||||
{"name":"lookbook","version":"1.0.8","platform":"ruby","checksum":"e4b8789c5ff25c6443394da1d6b62966642c324e19c42d7f4cf3b5da2fe75f77"},
|
||||
{"name":"lookbook","version":"1.2.1","platform":"ruby","checksum":"742844b625798b689215d1660f711aa79ff54084f5e8735fe674fe771fc165d7"},
|
||||
{"name":"lru_redux","version":"1.1.0","platform":"ruby","checksum":"ee71d0ccab164c51de146c27b480a68b3631d5b4297b8ffe8eda1c72de87affb"},
|
||||
{"name":"lumberjack","version":"1.2.7","platform":"ruby","checksum":"a5c6aae6b4234f1420dbcd80b23e3bca0817bd239440dde097ebe3fa63c63b1f"},
|
||||
{"name":"mail","version":"2.7.1","platform":"ruby","checksum":"ec2a3d489f7510b90d8eaa3f6abaad7038cf1d663cdf8ee66d0214a0bdf99c03"},
|
||||
|
|
|
@ -840,17 +840,19 @@ GEM
|
|||
loofah (2.19.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
lookbook (1.0.8)
|
||||
lookbook (1.2.1)
|
||||
actioncable
|
||||
activemodel
|
||||
css_parser
|
||||
htmlbeautifier (~> 1.3)
|
||||
htmlentities (~> 4.3.4)
|
||||
listen (~> 3.0)
|
||||
railties (>= 5.0)
|
||||
redcarpet (~> 3.5)
|
||||
rouge (~> 3.26)
|
||||
rouge (>= 3.26, < 5.0)
|
||||
view_component (~> 2.0)
|
||||
yard (~> 0.9.25)
|
||||
zeitwerk (~> 2.5)
|
||||
lru_redux (1.1.0)
|
||||
lumberjack (1.2.7)
|
||||
mail (2.7.1)
|
||||
|
@ -1689,7 +1691,7 @@ DEPENDENCIES
|
|||
lockbox (~> 0.6.2)
|
||||
lograge (~> 0.5)
|
||||
loofah (~> 2.19.0)
|
||||
lookbook (~> 1.0, >= 1.0.8)
|
||||
lookbook (~> 1.2, >= 1.2.1)
|
||||
lru_redux
|
||||
mail (= 2.7.1)
|
||||
mail-smtp_pool (~> 0.1.0)!
|
||||
|
|
|
@ -57,7 +57,8 @@ export default {
|
|||
this.isLoading = true;
|
||||
|
||||
if (this.graphql) {
|
||||
this.$apollo.mutate({ mutation: actionMutation, variables: { action } });
|
||||
await this.$apollo.mutate({ mutation: actionMutation, variables: { action } });
|
||||
this.isLoading = false;
|
||||
} else {
|
||||
eventHub.$emit('postAction', { endpoint: action.playPath });
|
||||
}
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
%p
|
||||
= s_('409|Please contact your GitLab administrator if you think this is a mistake.')
|
||||
.action-container.js-go-back{ hidden: true }
|
||||
%button{ type: 'button', class: 'gl-button btn btn-primary' }
|
||||
= render Pajamas::ButtonComponent.new(variant: :confirm) do
|
||||
= _('Go Back')
|
||||
= render "errors/footer"
|
||||
|
|
|
@ -26,7 +26,7 @@ gem 'octokit', '~> 5.6.1'
|
|||
gem "faraday-retry", "~> 2.0"
|
||||
gem 'webdrivers', '~> 5.2'
|
||||
gem 'zeitwerk', '~> 2.4'
|
||||
gem 'influxdb-client', '~> 1.17'
|
||||
gem 'influxdb-client', '~> 2.7'
|
||||
gem 'terminal-table', '~> 3.0.2', require: false
|
||||
gem 'slack-notifier', '~> 2.4', require: false
|
||||
gem 'fog-google', '~> 1.19', require: false
|
||||
|
|
|
@ -156,7 +156,7 @@ GEM
|
|||
httpclient (2.8.3)
|
||||
i18n (1.12.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
influxdb-client (1.17.0)
|
||||
influxdb-client (2.7.0)
|
||||
jwt (2.5.0)
|
||||
knapsack (4.0.0)
|
||||
rake
|
||||
|
@ -315,7 +315,7 @@ DEPENDENCIES
|
|||
fog-core (= 2.1.0)
|
||||
fog-google (~> 1.19)
|
||||
gitlab-qa (~> 8, >= 8.8.0)
|
||||
influxdb-client (~> 1.17)
|
||||
influxdb-client (~> 2.7)
|
||||
knapsack (~> 4.0)
|
||||
nokogiri (~> 1.13, >= 1.13.9)
|
||||
octokit (~> 5.6.1)
|
||||
|
|
|
@ -7,7 +7,7 @@ RSpec.describe 'Branches' do
|
|||
let_it_be(:project) { create(:project, :public, :repository) }
|
||||
let(:repository) { project.repository }
|
||||
|
||||
context 'logged in as developer' do
|
||||
context 'when logged in as developer' do
|
||||
before do
|
||||
sign_in(user)
|
||||
project.add_developer(user)
|
||||
|
@ -21,11 +21,15 @@ RSpec.describe 'Branches' do
|
|||
before do
|
||||
# Add 4 stale branches
|
||||
(1..4).reverse_each do |i|
|
||||
travel_to((threshold + i.hours).ago) { create_file(message: "a commit in stale-#{i}", branch_name: "stale-#{i}") }
|
||||
travel_to((threshold + i.hours).ago) do
|
||||
create_file(message: "a commit in stale-#{i}", branch_name: "stale-#{i}")
|
||||
end
|
||||
end
|
||||
# Add 6 active branches
|
||||
(1..6).each do |i|
|
||||
travel_to((threshold - i.hours).ago) { create_file(message: "a commit in active-#{i}", branch_name: "active-#{i}") }
|
||||
travel_to((threshold - i.hours).ago) do
|
||||
create_file(message: "a commit in active-#{i}", branch_name: "active-#{i}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -38,7 +42,10 @@ RSpec.describe 'Branches' do
|
|||
|
||||
expect(page).to have_button('Copy branch name')
|
||||
|
||||
expect(page).to have_link('Show more active branches', href: project_branches_filtered_path(project, state: 'active'))
|
||||
expect(page).to have_link(
|
||||
'Show more active branches',
|
||||
href: project_branches_filtered_path(project, state: 'active')
|
||||
)
|
||||
expect(page).not_to have_content('Show more stale branches')
|
||||
end
|
||||
end
|
||||
|
@ -75,13 +82,15 @@ RSpec.describe 'Branches' do
|
|||
it 'shows only default_per_page active branches sorted by last updated' do
|
||||
visit project_branches_filtered_path(project, state: 'active')
|
||||
|
||||
expect(page).to have_content(sorted_branches(repository, count: Kaminari.config.default_per_page, sort_by: :updated_desc, state: 'active'))
|
||||
expect(page).to have_content(sorted_branches(repository, count: Kaminari.config.default_per_page,
|
||||
sort_by: :updated_desc, state: 'active'))
|
||||
end
|
||||
|
||||
it 'shows only default_per_page branches sorted by last updated on All branches' do
|
||||
visit project_branches_filtered_path(project, state: 'all')
|
||||
|
||||
expect(page).to have_content(sorted_branches(repository, count: Kaminari.config.default_per_page, sort_by: :updated_desc))
|
||||
expect(page).to have_content(sorted_branches(repository, count: Kaminari.config.default_per_page,
|
||||
sort_by: :updated_desc))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -141,7 +150,7 @@ RSpec.describe 'Branches' do
|
|||
it 'avoids a N+1 query in branches index' do
|
||||
control_count = ActiveRecord::QueryRecorder.new { visit project_branches_path(project) }.count
|
||||
|
||||
%w(one two three four five).each { |ref| repository.add_branch(user, ref, 'master') }
|
||||
%w[one two three four five].each { |ref| repository.add_branch(user, ref, 'master') }
|
||||
|
||||
expect { visit project_branches_filtered_path(project, state: 'all') }.not_to exceed_query_limit(control_count)
|
||||
end
|
||||
|
@ -193,7 +202,7 @@ RSpec.describe 'Branches' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'logged in as maintainer' do
|
||||
context 'when logged in as maintainer' do
|
||||
before do
|
||||
sign_in(user)
|
||||
project.add_maintainer(user)
|
||||
|
@ -220,7 +229,7 @@ RSpec.describe 'Branches' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'logged out' do
|
||||
context 'when logged out' do
|
||||
before do
|
||||
visit project_branches_path(project)
|
||||
end
|
||||
|
@ -314,7 +323,7 @@ RSpec.describe 'Branches' do
|
|||
Regexp.new(sorted_branches.join('.*'))
|
||||
end
|
||||
|
||||
def create_file(message: 'message', branch_name:)
|
||||
def create_file(branch_name:, message: 'message')
|
||||
repository.create_file(user, generate(:branch), 'content', message: message, branch_name: branch_name)
|
||||
end
|
||||
|
||||
|
|
|
@ -336,6 +336,11 @@ RSpec.describe 'Environments page', :js do
|
|||
accept_gl_confirm do
|
||||
find(action_link_selector).click
|
||||
end
|
||||
|
||||
# Wait for UI to transition to ensure we an GraphQL request has been made
|
||||
within(actions_button_selector) { find('.gl-spinner') }
|
||||
within(actions_button_selector) { find('[data-testid="play-icon"]') }
|
||||
|
||||
wait_for_requests
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue