Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
2ecc6e22e3
commit
20de59fb35
|
|
@ -1246,8 +1246,6 @@ Rails/SaveBang:
|
|||
Exclude:
|
||||
- 'ee/spec/controllers/projects/merge_requests_controller_spec.rb'
|
||||
- 'ee/spec/controllers/subscriptions_controller_spec.rb'
|
||||
- 'ee/spec/finders/epics_finder_spec.rb'
|
||||
- 'ee/spec/finders/security/vulnerabilities_finder_spec.rb'
|
||||
- 'ee/spec/frontend/fixtures/analytics.rb'
|
||||
- 'ee/spec/graphql/resolvers/vulnerabilities_resolver_spec.rb'
|
||||
- 'ee/spec/initializers/fog_google_https_private_urls_spec.rb'
|
||||
|
|
@ -1524,17 +1522,6 @@ Rails/SaveBang:
|
|||
- 'spec/features/security/project/public_access_spec.rb'
|
||||
- 'spec/features/users/login_spec.rb'
|
||||
- 'spec/features/users/show_spec.rb'
|
||||
- 'spec/finders/admin/projects_finder_spec.rb'
|
||||
- 'spec/finders/autocomplete/move_to_project_finder_spec.rb'
|
||||
- 'spec/finders/ci/pipelines_for_merge_request_finder_spec.rb'
|
||||
- 'spec/finders/group_descendants_finder_spec.rb'
|
||||
- 'spec/finders/group_projects_finder_spec.rb'
|
||||
- 'spec/finders/issues_finder_spec.rb'
|
||||
- 'spec/finders/joined_groups_finder_spec.rb'
|
||||
- 'spec/finders/merge_requests_finder_spec.rb'
|
||||
- 'spec/finders/personal_projects_finder_spec.rb'
|
||||
- 'spec/finders/projects_finder_spec.rb'
|
||||
- 'spec/finders/uploader_finder_spec.rb'
|
||||
- 'spec/frontend/fixtures/issues.rb'
|
||||
- 'spec/frontend/fixtures/merge_requests.rb'
|
||||
- 'spec/graphql/mutations/merge_requests/set_locked_spec.rb'
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ scss_files:
|
|||
|
||||
exclude:
|
||||
- 'app/assets/stylesheets/pages/emojis.scss'
|
||||
- 'app/assets/stylesheets/startup/startup-general.scss'
|
||||
|
||||
linters:
|
||||
# Reports when you use improper spacing around ! (the "bang") in !default,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import { mapGetters } from 'vuex';
|
||||
import Icon from '~/vue_shared/components/icon.vue';
|
||||
import { __ } from '~/locale';
|
||||
import { GlTooltipDirective } from '@gitlab/ui';
|
||||
import { GlTooltipDirective, GlFriendlyWrap } from '@gitlab/ui';
|
||||
import SmartVirtualList from '~/vue_shared/components/smart_virtual_list.vue';
|
||||
|
||||
export default {
|
||||
|
|
@ -10,6 +10,7 @@ export default {
|
|||
components: {
|
||||
Icon,
|
||||
SmartVirtualList,
|
||||
GlFriendlyWrap,
|
||||
},
|
||||
directives: {
|
||||
GlTooltip: GlTooltipDirective,
|
||||
|
|
@ -29,6 +30,7 @@ export default {
|
|||
},
|
||||
maxShownRows: 30,
|
||||
typicalRowHeight: 75,
|
||||
wrapSymbols: ['::', '#', '.', '_', '-', '/', '\\'],
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
@ -72,14 +74,18 @@ export default {
|
|||
<div class="table-section section-20 section-wrap">
|
||||
<div role="rowheader" class="table-mobile-header">{{ __('Suite') }}</div>
|
||||
<div class="table-mobile-content pr-md-1 gl-overflow-wrap-break">
|
||||
{{ testCase.classname }}
|
||||
<gl-friendly-wrap :symbols="$options.wrapSymbols" :text="testCase.classname" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-section section-20 section-wrap">
|
||||
<div role="rowheader" class="table-mobile-header">{{ __('Name') }}</div>
|
||||
<div class="table-mobile-content pr-md-1 gl-overflow-wrap-break">
|
||||
{{ testCase.name }}
|
||||
<gl-friendly-wrap
|
||||
data-testid="caseName"
|
||||
:symbols="$options.wrapSymbols"
|
||||
:text="testCase.name"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -51,3 +51,9 @@
|
|||
@media print {
|
||||
@import 'print';
|
||||
}
|
||||
|
||||
/* Rules for overriding cloaking in startup-general.scss */
|
||||
.container-limited,
|
||||
.modal-dialog {
|
||||
display: block;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -231,6 +231,18 @@ module ApplicationHelper
|
|||
"#{request.path}?#{options.compact.to_param}"
|
||||
end
|
||||
|
||||
def use_startup_css?
|
||||
params[:startup_css] == 'true' || cookies['startup_css'] == 'true'
|
||||
end
|
||||
|
||||
def stylesheet_link_tag_defer(path)
|
||||
if use_startup_css?
|
||||
stylesheet_link_tag(path, media: "print", onload: "this.onload=null;this.media='all'")
|
||||
else
|
||||
stylesheet_link_tag(path, media: "all")
|
||||
end
|
||||
end
|
||||
|
||||
def outdated_browser?
|
||||
browser.ie?
|
||||
end
|
||||
|
|
|
|||
|
|
@ -55,7 +55,11 @@ module Projects
|
|||
|
||||
save_project_and_import_data
|
||||
|
||||
after_create_actions if @project.persisted?
|
||||
if @project.persisted?
|
||||
Gitlab::ApplicationContext.with_context(related_class: "Projects::CreateService", project: @project) do
|
||||
after_create_actions
|
||||
end
|
||||
end
|
||||
|
||||
import_schedule
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
- page_title _('Deploy Keys')
|
||||
|
||||
%h3.page-title.deploy-keys-title
|
||||
= _('Public deploy keys (%{deploy_keys_count})') % { deploy_keys_count: @deploy_keys.load.size }
|
||||
.float-right
|
||||
= link_to _('New deploy key'), new_admin_deploy_key_path, class: 'btn btn-success btn-sm btn-inverted'
|
||||
|
||||
- if @deploy_keys.any?
|
||||
%h3.page-title.deploy-keys-title
|
||||
= _('Public deploy keys (%{deploy_keys_count})') % { deploy_keys_count: @deploy_keys.load.size }
|
||||
= link_to _('New deploy key'), new_admin_deploy_key_path, class: 'float-right btn btn-success btn-md gl-button'
|
||||
.table-holder.deploy-keys-list
|
||||
%table.table
|
||||
%thead
|
||||
|
|
@ -32,3 +29,5 @@
|
|||
.float-right
|
||||
= link_to _('Edit'), edit_admin_deploy_key_path(deploy_key), class: 'btn btn-sm'
|
||||
= link_to _('Remove'), admin_deploy_key_path(deploy_key), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn btn-sm btn-remove delete-key'
|
||||
- else
|
||||
= render 'shared/empty_states/deploy_keys'
|
||||
|
|
|
|||
|
|
@ -49,14 +49,17 @@
|
|||
|
||||
= favicon_link_tag favicon, id: 'favicon', data: { original_href: favicon }, type: 'image/png'
|
||||
|
||||
- if use_startup_css?
|
||||
%style{ type: "text/css" }
|
||||
= Rails.application.assets_manifest.find_sources('startup/startup-general.css').first.to_s.html_safe
|
||||
- if user_application_theme == 'gl-dark'
|
||||
= stylesheet_link_tag "application_dark", media: "all"
|
||||
= stylesheet_link_tag_defer "application_dark"
|
||||
- else
|
||||
= stylesheet_link_tag "application", media: "all"
|
||||
= stylesheet_link_tag_defer "application"
|
||||
= stylesheet_link_tag "disable_animations", media: "all" if Rails.env.test? || Gitlab.config.gitlab['disable_animations']
|
||||
= stylesheet_link_tag 'performance_bar' if performance_bar_enabled?
|
||||
|
||||
= stylesheet_link_tag "highlight/themes/#{user_color_scheme}", media: "all"
|
||||
= stylesheet_link_tag_defer "highlight/themes/#{user_color_scheme}"
|
||||
|
||||
= Gon::Base.render_data(nonce: content_security_policy_nonce)
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
= render_if_exists 'shared/repository_size_limit_setting', form: f, type: :project
|
||||
|
||||
.form-group.gl-mt-3.append-bottom-20
|
||||
.form-group.gl-mt-3.gl-mb-3
|
||||
.avatar-container.s90
|
||||
= project_icon(@project, alt: _('Project avatar'), class: 'avatar project-avatar s90')
|
||||
= f.label :avatar, _('Project avatar'), class: 'label-bold d-block'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
.empty-state.gl-display-flex.gl-flex-direction-column.gl-flex-wrap.gl-text-center
|
||||
.gl-flex-grow-0.gl-flex-shrink-0
|
||||
.svg-250.svg-content
|
||||
= image_tag 'illustrations/empty-state/empty-deploy-keys-lg.svg'
|
||||
.gl-flex-grow-0.gl-flex-shrink-0
|
||||
.text-content.gl-mx-auto.gl-my-0.gl-p-5
|
||||
%h4.h4= _('Deploy keys allow read-only or read-write (if enabled) access to your repository')
|
||||
%p= _('Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one.')
|
||||
= link_to _('New deploy key'), new_admin_deploy_key_path, class: 'btn btn-success btn-md gl-button'
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Refactor spec/finders and ee/spec/finders to fix SaveBang Cop
|
||||
merge_request: 38173
|
||||
author: Rajendra Kadam
|
||||
type: fixed
|
||||
|
|
@ -169,6 +169,8 @@ module Gitlab
|
|||
|
||||
config.assets.precompile << "application_dark.css"
|
||||
|
||||
config.assets.precompile << "startup/*.css"
|
||||
|
||||
config.assets.precompile << "print.css"
|
||||
config.assets.precompile << "mailer.css"
|
||||
config.assets.precompile << "mailer_client_specific.css"
|
||||
|
|
|
|||
|
|
@ -382,14 +382,15 @@ The following documentation relates to the DevOps **Monitor** stage:
|
|||
GitLab Defend enables organizations to proactively protect cloud-native environments by providing
|
||||
context-aware technologies to reduce overall security risk. Defend is a natural extension of your
|
||||
existing operation's practices and provides security visibility across the entire DevSecOps
|
||||
lifecycle. This empowers your organization to apply DevSecOps best practices from the first line of
|
||||
code through monitoring and protecting your applications deployed into production.
|
||||
lifecycle. This visibility empowers your organization to apply DevSecOps best practices from the
|
||||
first line of code written and extends all the way through to greater monitoring and protection for
|
||||
your applications that are deployed in production.
|
||||
|
||||
The following documentation relates to the DevOps **Defend** stage:
|
||||
|
||||
| Defend topics | Description |
|
||||
|:------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------|
|
||||
| [Web Application Firewall with ModSecurity](user/compliance/compliance_dashboard/index.md) **(ULTIMATE)** | Filter, monitor, and block HTTP traffic to and from a web application. |
|
||||
| [Web Application Firewall with ModSecurity](user/compliance/compliance_dashboard/index.md) | Filter, monitor, and block HTTP traffic to and from a web application. |
|
||||
| [Container Host Security](user/clusters/applications.md#install-falco-using-gitlab-cicd) | Detect and respond to security threats at the Kubernetes, network, and host level. |
|
||||
| [Container Network Security](user/clusters/applications.md#install-cilium-using-gitlab-cicd) | Detect and block unauthorized network traffic between pods and to/from the internet.|
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
---
|
||||
stage: Monitor
|
||||
group: APM
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
|
||||
---
|
||||
|
||||
# Distributed Tracing - development guidelines
|
||||
|
||||
GitLab is instrumented for distributed tracing.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
---
|
||||
stage: Monitor
|
||||
group: APM
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
|
||||
---
|
||||
|
||||
# Elasticsearch knowledge **(STARTER ONLY)**
|
||||
|
||||
This area is to maintain a compendium of useful information when working with Elasticsearch.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
---
|
||||
stage: Monitor
|
||||
group: APM
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
|
||||
---
|
||||
|
||||
# Instrumenting Ruby code
|
||||
|
||||
[GitLab Performance Monitoring](../administration/monitoring/performance/index.md) allows instrumenting of both methods and custom
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
---
|
||||
stage: Monitor
|
||||
group: APM
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
|
||||
---
|
||||
|
||||
# GitLab Developers Guide to Logging
|
||||
|
||||
[GitLab Logs](../administration/logs.md) play a critical role for both
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
---
|
||||
stage: Monitor
|
||||
group: APM
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
|
||||
---
|
||||
|
||||
# Working with Prometheus
|
||||
|
||||
For more information on working with [Prometheus metrics](prometheus_metrics.md), see
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
---
|
||||
stage: Monitor
|
||||
group: APM
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
|
||||
---
|
||||
|
||||
# Working with Prometheus Metrics
|
||||
|
||||
## Adding to the library
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ The following languages and dependency managers are supported:
|
|||
|
||||
| Language (package managers) | Supported files | Scan tool(s) |
|
||||
|----------------------------- | --------------- | ------------ |
|
||||
| C# .NET ([NuGet](https://www.nuget.org/) 4.9+) | [`packages.lock.json`](https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#enabling-lock-file) | [Gemnasium](https://gitlab.com/gitlab-org/security-products/gemnasium) |
|
||||
| Java ([Gradle](https://gradle.org/), [Maven](https://maven.apache.org/)) | `build.gradle`, `build.gradle.kts`, `pom.xml` | [Gemnasium](https://gitlab.com/gitlab-org/security-products/gemnasium) |
|
||||
| JavaScript ([npm](https://www.npmjs.com/), [yarn](https://classic.yarnpkg.com/en/)) | `package-lock.json`, `npm-shrinkwrap.json`, `yarn.lock` | [Gemnasium](https://gitlab.com/gitlab-org/security-products/gemnasium), [Retire.js](https://retirejs.github.io/retire.js/) |
|
||||
| Go ([Golang](https://golang.org/)) | `go.sum` | [Gemnasium](https://gitlab.com/gitlab-org/security-products/gemnasium) |
|
||||
|
|
|
|||
|
|
@ -160,8 +160,9 @@ When it succeeds, go to **Settings > Pages** to view the URL where your site
|
|||
is now available.
|
||||
|
||||
If you want to do more advanced tasks, you can update your `.gitlab-ci.yml` file
|
||||
with [any of the available settings](../../../../ci/yaml/README.md). You can check
|
||||
your CI syntax with the [GitLab CI/CD Lint Tool](../../../../ci/yaml/README.md#validate-the-gitlab-ciyml).
|
||||
with [any of the available settings](../../../../ci/yaml/README.md). See
|
||||
[Validate the `.gitlab-ci.yml`](../../../../ci/yaml/README.md#validate-the-gitlab-ciyml)
|
||||
for instructions on validating your YAML file with the Lint tool included with GitLab.
|
||||
|
||||
The following topics show other examples of other options you can add to your CI/CD file.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,6 @@ stage: Create
|
|||
group: Source Code
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
|
||||
disqus_identifier: 'https://docs.gitlab.com/ee/workflow/repository_mirroring.html'
|
||||
stage: Create
|
||||
group: Source Code
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
|
||||
---
|
||||
|
||||
# Repository mirroring
|
||||
|
|
@ -150,8 +147,7 @@ To set up a mirror from GitLab to AWS CodeCommit:
|
|||
been tested to be the minimum (least privileged) required for mirroring:
|
||||
|
||||
```json
|
||||
|
||||
{
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
|
|
@ -168,9 +164,8 @@ To set up a mirror from GitLab to AWS CodeCommit:
|
|||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
|
||||
1. After the user was created, click the AWS IAM user name.
|
||||
1. Click the **Security credentials** tab.
|
||||
1. Under **HTTPS Git credentials for AWS CodeCommit** click **Generate credentials**.
|
||||
|
|
|
|||
|
|
@ -7954,9 +7954,15 @@ msgstr ""
|
|||
msgid "Deploy key was successfully updated."
|
||||
msgstr ""
|
||||
|
||||
msgid "Deploy keys allow read-only or read-write (if enabled) access to your repository"
|
||||
msgstr ""
|
||||
|
||||
msgid "Deploy keys allow read-only or read-write (if enabled) access to your repository. Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one."
|
||||
msgstr ""
|
||||
|
||||
msgid "Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one."
|
||||
msgstr ""
|
||||
|
||||
msgid "Deploy progress not found. To see pods, ensure your environment matches %{linkStart}deploy board criteria%{linkEnd}."
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
"prettier-staged-save": "node ./scripts/frontend/prettier.js save",
|
||||
"prettier-all": "node ./scripts/frontend/prettier.js check-all",
|
||||
"prettier-all-save": "node ./scripts/frontend/prettier.js save-all",
|
||||
"stylelint": "yarn stylelint-file 'app/assets/stylesheets/**/*.*' 'ee/app/assets/stylesheets/**/*.*' '!**/vendors/**'",
|
||||
"stylelint": "yarn stylelint-file 'app/assets/stylesheets/**/*.*' 'ee/app/assets/stylesheets/**/*.*' '!app/assets/stylesheets/startup/startup-general.scss' '!**/vendors/**'",
|
||||
"stylelint-file": "BROWSERSLIST_IGNORE_OLD_DATA=true node node_modules/stylelint/bin/stylelint.js",
|
||||
"stylelint-create-utility-map": "node scripts/frontend/stylelint/stylelint-utility-map.js",
|
||||
"test": "node scripts/frontend/test",
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
"@babel/preset-env": "^7.10.1",
|
||||
"@gitlab/at.js": "1.5.5",
|
||||
"@gitlab/svgs": "1.156.0",
|
||||
"@gitlab/ui": "17.43.0",
|
||||
"@gitlab/ui": "18.0.0",
|
||||
"@gitlab/visual-review-tools": "1.6.1",
|
||||
"@rails/actioncable": "^6.0.3-1",
|
||||
"@sentry/browser": "^5.10.2",
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ RSpec.describe Admin::ProjectsFinder do
|
|||
|
||||
context 'filter by abandoned' do
|
||||
before do
|
||||
private_project.update(last_activity_at: Time.zone.now - 6.months - 1.minute)
|
||||
private_project.update!(last_activity_at: Time.zone.now - 6.months - 1.minute)
|
||||
end
|
||||
|
||||
let(:params) { { abandoned: true } }
|
||||
|
|
@ -98,7 +98,7 @@ RSpec.describe Admin::ProjectsFinder do
|
|||
|
||||
context 'filter by last_repository_check_failed' do
|
||||
before do
|
||||
private_project.update(last_repository_check_failed: true)
|
||||
private_project.update!(last_repository_check_failed: true)
|
||||
end
|
||||
|
||||
let(:params) { { last_repository_check_failed: true } }
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ RSpec.describe Autocomplete::MoveToProjectFinder do
|
|||
|
||||
it 'does not return projects for which issues are disabled' do
|
||||
reporter_project.add_reporter(user)
|
||||
reporter_project.update(issues_enabled: false)
|
||||
reporter_project.update!(issues_enabled: false)
|
||||
other_reporter_project = create(:project)
|
||||
other_reporter_project.add_reporter(user)
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ RSpec.describe Ci::PipelinesForMergeRequestFinder do
|
|||
|
||||
context 'with multiple irrelevant merge_request_diffs' do
|
||||
before do
|
||||
merge_request.update(target_branch: 'v1.0.0')
|
||||
merge_request.update!(target_branch: 'v1.0.0')
|
||||
end
|
||||
|
||||
it_behaves_like 'returning pipelines with proper ordering'
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ RSpec.describe GroupDescendantsFinder do
|
|||
it 'does not include projects shared with the group' do
|
||||
project = create(:project, namespace: group)
|
||||
other_project = create(:project)
|
||||
other_project.project_group_links.create(group: group,
|
||||
other_project.project_group_links.create!(group: group,
|
||||
group_access: Gitlab::Access::MAINTAINER)
|
||||
|
||||
expect(finder.execute).to contain_exactly(project)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ RSpec.describe GroupProjectsFinder do
|
|||
let!(:shared_project_4) { create(:project, :internal, path: '8') }
|
||||
|
||||
before do
|
||||
shared_project_4.project_group_links.create(group_access: Gitlab::Access::REPORTER, group: group)
|
||||
shared_project_4.project_group_links.create!(group_access: Gitlab::Access::REPORTER, group: group)
|
||||
end
|
||||
|
||||
let(:params) { { min_access_level: Gitlab::Access::MAINTAINER } }
|
||||
|
|
@ -76,7 +76,7 @@ RSpec.describe GroupProjectsFinder do
|
|||
|
||||
context "with external user" do
|
||||
before do
|
||||
current_user.update(external: true)
|
||||
current_user.update!(external: true)
|
||||
end
|
||||
|
||||
it { is_expected.to match_array([shared_project_2, shared_project_1]) }
|
||||
|
|
@ -107,7 +107,7 @@ RSpec.describe GroupProjectsFinder do
|
|||
|
||||
context "with external user" do
|
||||
before do
|
||||
current_user.update(external: true)
|
||||
current_user.update!(external: true)
|
||||
end
|
||||
|
||||
context 'with subgroups projects' do
|
||||
|
|
|
|||
|
|
@ -185,9 +185,9 @@ RSpec.describe IssuesFinder do
|
|||
let(:params) { { milestone_title: group_milestone.title } }
|
||||
|
||||
before do
|
||||
project2.update(namespace: group)
|
||||
issue2.update(milestone: group_milestone)
|
||||
issue3.update(milestone: group_milestone)
|
||||
project2.update!(namespace: group)
|
||||
issue2.update!(milestone: group_milestone)
|
||||
issue3.update!(milestone: group_milestone)
|
||||
end
|
||||
|
||||
it 'returns issues assigned to that group milestone' do
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ RSpec.describe JoinedGroupsFinder do
|
|||
|
||||
context 'external users' do
|
||||
before do
|
||||
profile_visitor.update(external: true)
|
||||
profile_visitor.update!(external: true)
|
||||
end
|
||||
|
||||
context 'if not a member' do
|
||||
|
|
|
|||
|
|
@ -335,9 +335,8 @@ RSpec.describe MergeRequestsFinder do
|
|||
let(:group_milestone) { create(:milestone, group: group) }
|
||||
|
||||
before do
|
||||
project2.update(namespace: group)
|
||||
merge_request2.update(milestone: group_milestone)
|
||||
merge_request3.update(milestone: group_milestone)
|
||||
merge_request1.update!(milestone: group_milestone)
|
||||
merge_request2.update!(milestone: group_milestone)
|
||||
end
|
||||
|
||||
it 'returns merge requests assigned to that group milestone' do
|
||||
|
|
@ -345,7 +344,7 @@ RSpec.describe MergeRequestsFinder do
|
|||
|
||||
merge_requests = described_class.new(user, params).execute
|
||||
|
||||
expect(merge_requests).to contain_exactly(merge_request2, merge_request3)
|
||||
expect(merge_requests).to contain_exactly(merge_request1, merge_request2)
|
||||
end
|
||||
|
||||
context 'using NOT' do
|
||||
|
|
@ -354,7 +353,7 @@ RSpec.describe MergeRequestsFinder do
|
|||
it 'returns MRs not assigned to that group milestone' do
|
||||
merge_requests = described_class.new(user, params).execute
|
||||
|
||||
expect(merge_requests).to contain_exactly(merge_request1, merge_request4, merge_request5)
|
||||
expect(merge_requests).to contain_exactly(merge_request3, merge_request4, merge_request5)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ RSpec.describe PersonalProjectsFinder do
|
|||
|
||||
context 'external' do
|
||||
before do
|
||||
current_user.update(external: true)
|
||||
current_user.update!(external: true)
|
||||
end
|
||||
|
||||
it { is_expected.to eq([public_project, private_project]) }
|
||||
|
|
|
|||
|
|
@ -244,8 +244,8 @@ RSpec.describe ProjectsFinder, :do_not_mock_admin_mode do
|
|||
let(:params) { { last_activity_after: 60.minutes.ago } }
|
||||
|
||||
before do
|
||||
internal_project.update(last_activity_at: Time.now)
|
||||
public_project.update(last_activity_at: 61.minutes.ago)
|
||||
internal_project.update!(last_activity_at: Time.now)
|
||||
public_project.update!(last_activity_at: 61.minutes.ago)
|
||||
end
|
||||
|
||||
it { is_expected.to match_array([internal_project]) }
|
||||
|
|
@ -255,8 +255,8 @@ RSpec.describe ProjectsFinder, :do_not_mock_admin_mode do
|
|||
let(:params) { { last_activity_before: 60.minutes.ago } }
|
||||
|
||||
before do
|
||||
internal_project.update(last_activity_at: Time.now)
|
||||
public_project.update(last_activity_at: 61.minutes.ago)
|
||||
internal_project.update!(last_activity_at: Time.now)
|
||||
public_project.update!(last_activity_at: 61.minutes.ago)
|
||||
end
|
||||
|
||||
it { is_expected.to match_array([public_project]) }
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ RSpec.describe UploaderFinder do
|
|||
subject { described_class.new(project, secret, file_name).execute }
|
||||
|
||||
before do
|
||||
upload.save
|
||||
upload.save!
|
||||
end
|
||||
|
||||
context 'when successful' do
|
||||
|
|
@ -32,7 +32,7 @@ RSpec.describe UploaderFinder do
|
|||
context 'when path traversal in file name' do
|
||||
before do
|
||||
upload.path = '/uploads/11111111111111111111111111111111/../../../../../../../../../../../../../../etc/passwd)'
|
||||
upload.save
|
||||
upload.save!
|
||||
end
|
||||
|
||||
it 'returns nil' do
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { shallowMount } from '@vue/test-utils';
|
||||
import DesignVersionDropdown from '~/design_management_legacy/components/upload/design_version_dropdown.vue';
|
||||
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
|
||||
import { GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui';
|
||||
import mockAllVersions from './mock_data/all_versions';
|
||||
|
||||
const LATEST_VERSION_ID = 3;
|
||||
|
|
@ -75,7 +75,9 @@ describe('Design management design version dropdown component', () => {
|
|||
createComponent();
|
||||
|
||||
return wrapper.vm.$nextTick().then(() => {
|
||||
expect(wrapper.find(GlDropdown).attributes('text')).toBe('Showing Latest Version');
|
||||
expect(wrapper.find(GlDeprecatedDropdown).attributes('text')).toBe(
|
||||
'Showing Latest Version',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -83,7 +85,9 @@ describe('Design management design version dropdown component', () => {
|
|||
createComponent({ maxVersions: 1 });
|
||||
|
||||
return wrapper.vm.$nextTick().then(() => {
|
||||
expect(wrapper.find(GlDropdown).attributes('text')).toBe('Showing Latest Version');
|
||||
expect(wrapper.find(GlDeprecatedDropdown).attributes('text')).toBe(
|
||||
'Showing Latest Version',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -91,7 +95,7 @@ describe('Design management design version dropdown component', () => {
|
|||
createComponent({ $route: designRouteFactory(PREVIOUS_VERSION_ID) });
|
||||
|
||||
return wrapper.vm.$nextTick().then(() => {
|
||||
expect(wrapper.find(GlDropdown).attributes('text')).toBe(`Showing Version #1`);
|
||||
expect(wrapper.find(GlDeprecatedDropdown).attributes('text')).toBe(`Showing Version #1`);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -99,7 +103,9 @@ describe('Design management design version dropdown component', () => {
|
|||
createComponent({ $route: designRouteFactory(LATEST_VERSION_ID) });
|
||||
|
||||
return wrapper.vm.$nextTick().then(() => {
|
||||
expect(wrapper.find(GlDropdown).attributes('text')).toBe('Showing Latest Version');
|
||||
expect(wrapper.find(GlDeprecatedDropdown).attributes('text')).toBe(
|
||||
'Showing Latest Version',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -107,7 +113,9 @@ describe('Design management design version dropdown component', () => {
|
|||
createComponent();
|
||||
|
||||
return wrapper.vm.$nextTick().then(() => {
|
||||
expect(wrapper.findAll(GlDropdownItem)).toHaveLength(wrapper.vm.allVersions.length);
|
||||
expect(wrapper.findAll(GlDeprecatedDropdownItem)).toHaveLength(
|
||||
wrapper.vm.allVersions.length,
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ describe('Test reports suite table', () => {
|
|||
const noCasesMessage = () => wrapper.find('.js-no-test-cases');
|
||||
const allCaseRows = () => wrapper.findAll('.js-case-row');
|
||||
const findCaseRowAtIndex = index => wrapper.findAll('.js-case-row').at(index);
|
||||
const allCaseNames = () =>
|
||||
wrapper.findAll('[data-testid="caseName"]').wrappers.map(el => el.attributes('text'));
|
||||
const findIconForRow = (row, status) => row.find(`.ci-status-icon-${status}`);
|
||||
|
||||
const createComponent = (suite = testSuite) => {
|
||||
|
|
@ -61,18 +63,14 @@ describe('Test reports suite table', () => {
|
|||
expect(allCaseRows().length).toBe(testCases.length);
|
||||
});
|
||||
|
||||
it('renders the failed tests first', () => {
|
||||
const failedCaseNames = testCases
|
||||
.filter(x => x.status === TestStatus.FAILED)
|
||||
.map(x => x.name);
|
||||
it('renders the failed tests first, skipped tests next, then successful tests', () => {
|
||||
const expectedCaseOrder = [
|
||||
...testCases.filter(x => x.status === TestStatus.FAILED),
|
||||
...testCases.filter(x => x.status === TestStatus.SKIPPED),
|
||||
...testCases.filter(x => x.status === TestStatus.SUCCESS),
|
||||
].map(x => x.name);
|
||||
|
||||
const skippedCaseNames = testCases
|
||||
.filter(x => x.status === TestStatus.SKIPPED)
|
||||
.map(x => x.name);
|
||||
|
||||
expect(findCaseRowAtIndex(0).text()).toContain(failedCaseNames[0]);
|
||||
expect(findCaseRowAtIndex(1).text()).toContain(failedCaseNames[1]);
|
||||
expect(findCaseRowAtIndex(2).text()).toContain(skippedCaseNames[0]);
|
||||
expect(allCaseNames()).toEqual(expectedCaseOrder);
|
||||
});
|
||||
|
||||
it('renders the correct icon for each status', () => {
|
||||
|
|
|
|||
|
|
@ -735,12 +735,6 @@ RSpec.describe MergeRequestDiff do
|
|||
let(:merge_request) { create(:merge_request, source_branch: 'feature', target_branch: 'master') }
|
||||
let(:diff) { merge_request.merge_request_diff }
|
||||
|
||||
# before do
|
||||
# # Temporarily unstub diff.modified_paths in favor of original code
|
||||
# #
|
||||
# allow(diff).to receive(:modified_paths).and_call_original
|
||||
# end
|
||||
|
||||
context "when the merge_request_diff is overflowed" do
|
||||
before do
|
||||
expect(diff).to receive(:overflow?).and_return(true)
|
||||
|
|
|
|||
|
|
@ -48,6 +48,12 @@ RSpec.describe Projects::CreateService, '#execute' do
|
|||
|
||||
expect(project.project_setting).to be_new_record
|
||||
end
|
||||
|
||||
it_behaves_like 'storing arguments in the application context' do
|
||||
let(:expected_params) { { project: subject.full_path, related_class: described_class.to_s } }
|
||||
|
||||
subject { create_project(user, opts) }
|
||||
end
|
||||
end
|
||||
|
||||
context "admin creates project with other user's namespace_id" do
|
||||
|
|
|
|||
|
|
@ -848,10 +848,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.156.0.tgz#2af56246b5d71000ec81abb1281e811a921cdfd1"
|
||||
integrity sha512-+b670Sxkjo80Wb4GKMZQ+xvuwu9sVvql8aS9nzw63FLn84QyqXS+jMjvyDqPAW5kly6B1Eg4Kljq0YawJ0ySBg==
|
||||
|
||||
"@gitlab/ui@17.43.0":
|
||||
version "17.43.0"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-17.43.0.tgz#2a61ba53aaf8a3325a3eba6753ba57a937bdb656"
|
||||
integrity sha512-3JnzjQtcTWYZGxJfsg58k1oBOrPjWrhwlsW7MD9yHaGm9No71+RP50htck5p5hDRQ+MKxwZ9n4MOON3L8mnjIg==
|
||||
"@gitlab/ui@18.0.0":
|
||||
version "18.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-18.0.0.tgz#5cba4054332d279e5e32c356524c8cf44633ba57"
|
||||
integrity sha512-HEn+HEi5EjSKOpNP5r8wUXpnMAskJ51RB7KHz+p7ULx93/2t6iXFC5lU2ta/TVxEonCpJmFmtIeGuYl8DtG54g==
|
||||
dependencies:
|
||||
"@babel/standalone" "^7.0.0"
|
||||
"@gitlab/vue-toasted" "^1.3.0"
|
||||
|
|
|
|||
Loading…
Reference in New Issue