Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
d4a7d0bec2
commit
4ea2496094
|
|
@ -1 +1 @@
|
|||
93d46d0be8467aa4849f981d390357d6a3491420
|
||||
4e84eaf02f3a5403ef44c3f51b8e46c57e24ed02
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import { GlSkeletonLoader, GlTable } from '@gitlab/ui';
|
||||
import createFlash from '~/flash';
|
||||
import { convertNodeIdsFromGraphQLIds } from '~/graphql_shared/utils';
|
||||
import { thWidthClass } from '~/lib/utils/table_utility';
|
||||
import { thWidthPercent } from '~/lib/utils/table_utility';
|
||||
import { s__, __ } from '~/locale';
|
||||
import UserDate from '~/vue_shared/components/user_date.vue';
|
||||
import getUsersGroupCountsQuery from '../graphql/queries/get_users_group_counts.query.graphql';
|
||||
|
|
@ -70,32 +70,32 @@ export default {
|
|||
{
|
||||
key: 'name',
|
||||
label: __('Name'),
|
||||
thClass: thWidthClass(40),
|
||||
thClass: thWidthPercent(40),
|
||||
},
|
||||
{
|
||||
key: 'projectsCount',
|
||||
label: __('Projects'),
|
||||
thClass: thWidthClass(10),
|
||||
thClass: thWidthPercent(10),
|
||||
},
|
||||
{
|
||||
key: 'groupCount',
|
||||
label: __('Groups'),
|
||||
thClass: thWidthClass(10),
|
||||
thClass: thWidthPercent(10),
|
||||
},
|
||||
{
|
||||
key: 'createdAt',
|
||||
label: __('Created on'),
|
||||
thClass: thWidthClass(15),
|
||||
thClass: thWidthPercent(15),
|
||||
},
|
||||
{
|
||||
key: 'lastActivityOn',
|
||||
label: __('Last activity'),
|
||||
thClass: thWidthClass(15),
|
||||
thClass: thWidthPercent(15),
|
||||
},
|
||||
{
|
||||
key: 'settings',
|
||||
label: '',
|
||||
thClass: thWidthClass(10),
|
||||
thClass: thWidthPercent(10),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,10 +28,14 @@ export default {
|
|||
i18n: {
|
||||
frontmatter: __('frontmatter'),
|
||||
},
|
||||
userColorScheme: gon.user_color_scheme,
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<node-view-wrapper class="content-editor-code-block gl-relative code highlight" as="pre">
|
||||
<node-view-wrapper
|
||||
:class="`content-editor-code-block gl-relative code highlight ${$options.userColorScheme}`"
|
||||
as="pre"
|
||||
>
|
||||
<span
|
||||
v-if="node.attrs.isFrontmatter"
|
||||
data-testid="frontmatter-label"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
collapseIcon() {
|
||||
return this.stage.isCollapsed ? 'angle-left' : 'angle-down';
|
||||
return this.stage.isCollapsed ? 'chevron-lg-left' : 'chevron-lg-down';
|
||||
},
|
||||
showLoadingIcon() {
|
||||
return this.stage.isLoading && !this.stage.jobs.length;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { convertToSnakeCase, convertToCamelCase } from '~/lib/utils/text_utility
|
|||
import { DEFAULT_TH_CLASSES } from './constants';
|
||||
|
||||
/**
|
||||
* Deprecated: use thWidthPercent instead
|
||||
* Generates the table header classes to be used for GlTable fields.
|
||||
*
|
||||
* @param {Number} width - The column width as a percentage.
|
||||
|
|
@ -9,6 +10,15 @@ import { DEFAULT_TH_CLASSES } from './constants';
|
|||
*/
|
||||
export const thWidthClass = (width) => `gl-w-${width}p ${DEFAULT_TH_CLASSES}`;
|
||||
|
||||
/**
|
||||
* Generates the table header class for width to be used for GlTable fields.
|
||||
*
|
||||
* @param {Number} width - The column width as a percentage. Only accepts values
|
||||
* as defined in https://gitlab.com/gitlab-org/gitlab-ui/blob/main/src/scss/utility-mixins/sizing.scss
|
||||
* @returns {String} The class to be used in GlTable fields object.
|
||||
*/
|
||||
export const thWidthPercent = (width) => `gl-w-${width}p`;
|
||||
|
||||
/**
|
||||
* Converts a GlTable sort-changed event object into string format.
|
||||
* This string can be used as a sort argument on GraphQL queries.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export default {
|
|||
return {
|
||||
id: 'home',
|
||||
view: 'home',
|
||||
icon: 'angle-left',
|
||||
icon: 'chevron-lg-left',
|
||||
};
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ export default {
|
|||
return this.discussion.notes.slice(0, 1)[0];
|
||||
},
|
||||
saveButtonTitle() {
|
||||
return this.discussion.confidential ? __('Reply internally') : __('Comment');
|
||||
return this.discussion.confidential ? __('Reply internally') : __('Reply');
|
||||
},
|
||||
shouldShowJumpToNextDiscussion() {
|
||||
return this.showJumpToNextDiscussion(this.discussionsByDiffOrder ? 'diff' : 'discussion');
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ export default {
|
|||
return {
|
||||
text: this.approvalText,
|
||||
category: this.isApproved ? 'secondary' : 'primary',
|
||||
variant: 'info',
|
||||
variant: 'confirm',
|
||||
action: () => this.approve(),
|
||||
};
|
||||
} else if (this.showUnapprove) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
@import 'mixins_and_variables_and_functions';
|
||||
@import 'highlight.js/scss/a11y-light';
|
||||
@import 'components/content_editor';
|
||||
|
||||
.title .edit-wiki-header {
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ module UsersHelper
|
|||
messageHtml: message,
|
||||
actionPrimary: {
|
||||
text: s_('AdminUsers|Confirm user'),
|
||||
attributes: [{ variant: 'info', 'data-qa-selector': 'confirm_user_confirm_button' }]
|
||||
attributes: [{ variant: 'confirm', 'data-qa-selector': 'confirm_user_confirm_button' }]
|
||||
},
|
||||
actionSecondary: {
|
||||
text: _('Cancel'),
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@ class Namespace::RootStorageStatistics < ApplicationRecord
|
|||
end
|
||||
|
||||
def attributes_for_container_registry_size
|
||||
return {} unless Feature.enabled?(:container_registry_namespace_statistics, namespace)
|
||||
|
||||
container_registry_size = namespace.container_repositories_size || 0
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
= render 'devise/shared/tab_single', tab_title: 'Resend confirmation instructions'
|
||||
.login-box
|
||||
.login-box.gl-p-5
|
||||
.login-body
|
||||
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, class: 'gl-show-field-errors' }) do |f|
|
||||
.devise-errors
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.gl-mb-5
|
||||
#update-shared-runners-form{ data: group_shared_runners_settings_data(@group) }
|
||||
- if Feature.enabled?(:stale_runner_cleanup_for_namespace_development, @group) && @group.licensed_feature_available?(:stale_runner_cleanup_for_namespace)
|
||||
- if @group.licensed_feature_available?(:stale_runner_cleanup_for_namespace)
|
||||
.gl-mb-5
|
||||
#stale-runner-cleanup-form{ data: { group_full_path: @group.full_path, stale_timeout_secs: ::Ci::Runner::STALE_TIMEOUT.to_i } }
|
||||
= render Pajamas::CardComponent.new(card_options: { class: 'gl-px-8 gl-py-6 gl-line-height-20' },
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#6b4fbb;height:4px;font-size:4px;line-height:4px;" }
|
||||
%tr.header
|
||||
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;" }
|
||||
%img{ alt: "GitLab", height: "55", src: image_url('mailers/gitlab_logo.png'), width: "55" }/
|
||||
= header_logo
|
||||
%tr
|
||||
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;" }
|
||||
%table.wrapper{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:640px;margin:0 auto;border-collapse:separate;border-spacing:0;" }
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#6b4fbb;height:4px;font-size:4px;line-height:4px;" }
|
||||
%tr.header
|
||||
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;" }
|
||||
%img{ alt: "GitLab", height: "55", src: image_url('mailers/gitlab_logo.png'), width: "55" }
|
||||
= header_logo
|
||||
%tr
|
||||
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;" }
|
||||
%table.wrapper{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:640px;margin:0 auto;border-collapse:separate;border-spacing:0;" }
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#6b4fbb;height:4px;font-size:4px;line-height:4px;" }
|
||||
%tr.header
|
||||
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;" }
|
||||
%img{ alt: "GitLab", height: "55", src: image_url('mailers/gitlab_logo.png'), width: "55" }/
|
||||
= header_logo
|
||||
%tr
|
||||
%td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;" }
|
||||
%table.wrapper{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:640px;margin:0 auto;border-collapse:separate;border-spacing:0;" }
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
%strong= @key.last_used_at.try(:to_s, :medium) || _('Never')
|
||||
|
||||
.col-md-8
|
||||
= form_errors(@key, type: 'key') unless @key.valid?
|
||||
= form_errors(@key, type: 'key', pajamas_alert: true) unless @key.valid?
|
||||
%pre.well-pre
|
||||
= @key.key
|
||||
.card
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@
|
|||
.filtered-search-box.m-0
|
||||
.filtered-search-box-input-container.pl-2
|
||||
= render 'shared/projects/search_form', admin_view: false, search_form_placeholder: _("Search projects...")
|
||||
%button.btn.gl-button.btn-icon.btn-secondary{ type: 'submit', form: 'project-filter-form' }
|
||||
= sprite_icon('search', css_class: 'search-icon ')
|
||||
= render Pajamas::ButtonComponent.new(icon: 'search', icon_classes: 'search-icon', button_options: { type: 'submit', form: 'project-filter-form' })
|
||||
.filtered-search-dropdown.flex-row.align-items-center.mb-2.m-sm-0#filtered-search-visibility-dropdown{ class: flex_grow_and_shrink_xs }
|
||||
.filtered-search-dropdown-label.p-0.pl-sm-3.font-weight-bold
|
||||
%span
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: container_registry_namespace_statistics
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87080
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/361960
|
||||
milestone: '15.0'
|
||||
type: development
|
||||
group: group::utilization
|
||||
default_enabled: false
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: stale_runner_cleanup_for_namespace_development
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87779/
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/363012
|
||||
milestone: '15.1'
|
||||
type: development
|
||||
group: group::runner
|
||||
default_enabled: false
|
||||
|
|
@ -765,11 +765,7 @@ defaults to the number of CPUs available.
|
|||
|
||||
## Clean up stale runners
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/363012) in GitLab 15.1 [with a flag](../../administration/feature_flags.md) named `stale_runner_cleanup_for_namespace_development`. Disabled by default.
|
||||
|
||||
FLAG:
|
||||
On self-managed GitLab, by default this feature is not available. To make it available per group,
|
||||
ask an administrator to [enable the feature flag](../../administration/feature_flags.md) named `stale_runner_cleanup_for_namespace_development`.
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/363012) in GitLab 15.1
|
||||
|
||||
You can clean up group runners that have been inactive for more than three months.
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ Each metric is defined in a separate YAML file consisting of a number of fields:
|
|||
| `name` | no | Metric name suggestion. Can replace the last part of `key_path`. |
|
||||
| `description` | yes | |
|
||||
| `product_section` | yes | The [section](https://gitlab.com/gitlab-com/www-gitlab-com/-/blob/master/data/sections.yml). |
|
||||
| `product_stage` | no | The [stage](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/data/stages.yml) for the metric. |
|
||||
| `product_stage` | yes | The [stage](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/data/stages.yml) for the metric. |
|
||||
| `product_group` | yes | The [group](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/data/stages.yml) that owns the metric. |
|
||||
| `product_category` | no | The [product category](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/data/categories.yml) for the metric. |
|
||||
| `value_type` | yes | `string`; one of [`string`, `number`, `boolean`, `object`](https://json-schema.org/understanding-json-schema/reference/type.html). |
|
||||
|
|
@ -43,11 +43,11 @@ Each metric is defined in a separate YAML file consisting of a number of fields:
|
|||
| `time_frame` | yes | `string`; may be set to a value like `7d`, `28d`, `all`, `none`. |
|
||||
| `data_source` | yes | `string`; may be set to a value like `database`, `redis`, `redis_hll`, `prometheus`, `system`. |
|
||||
| `data_category` | yes | `string`; [categories](#data-category) of the metric, may be set to `operational`, `optional`, `subscription`, `standard`. The default value is `optional`.|
|
||||
| `instrumentation_class` | no | `string`; [the class that implements the metric](metrics_instrumentation.md). |
|
||||
| `instrumentation_class` | yes | `string`; [the class that implements the metric](metrics_instrumentation.md). |
|
||||
| `distribution` | yes | `array`; may be set to one of `ce, ee` or `ee`. The [distribution](https://about.gitlab.com/handbook/marketing/strategic-marketing/tiers/#definitions) where the tracked feature is available. |
|
||||
| `performance_indicator_type` | no | `array`; may be set to one of [`gmau`, `smau`, `paid_gmau`, or `umau`](https://about.gitlab.com/handbook/business-technology/data-team/data-catalog/xmau-analysis/). |
|
||||
| `tier` | yes | `array`; may contain one or a combination of `free`, `premium` or `ultimate`. The [tier]( https://about.gitlab.com/handbook/marketing/strategic-marketing/tiers/) where the tracked feature is available. This should be verbose and contain all tiers where a metric is available. |
|
||||
| `milestone` | no | The milestone when the metric is introduced and when it's available to self-managed instances with the official GitLab release. |
|
||||
| `milestone` | yes | The milestone when the metric is introduced and when it's available to self-managed instances with the official GitLab release. |
|
||||
| `milestone_removed` | no | The milestone when the metric is removed. |
|
||||
| `introduced_by_url` | no | The URL to the merge request that introduced the metric to be available for self-managed instances. |
|
||||
| `removed_by_url` | no | The URL to the merge request that removed the metric. |
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ To create a thread by replying to a comment:
|
|||
The reply section is displayed.
|
||||
|
||||
1. Enter your reply.
|
||||
1. Select **Comment** or **Add comment now** (depending on where in the UI you are replying).
|
||||
1. Select **Reply** or **Add comment now** (depending on where in the UI you are replying).
|
||||
|
||||
The top comment is converted to a thread.
|
||||
|
||||
|
|
|
|||
|
|
@ -111,17 +111,27 @@ To work with Terraform modules in [GitLab CI/CD](../../../ci/index.md), you can
|
|||
For example:
|
||||
|
||||
```yaml
|
||||
image: curlimages/curl:latest
|
||||
|
||||
stages:
|
||||
- upload
|
||||
|
||||
upload:
|
||||
stage: upload
|
||||
image: curlimages/curl:latest
|
||||
variables:
|
||||
TERRAFORM_MODULE_DIR: ${CI_PROJECT_DIR} # The path to your Terraform module
|
||||
TERRAFORM_MODULE_NAME: ${CI_PROJECT_NAME} # The name of your Terraform module
|
||||
TERRAFORM_MODULE_SYSTEM: local # The system or provider your Terraform module targets (ex. local, aws, google)
|
||||
TERRAFORM_MODULE_VERSION: ${CI_COMMIT_TAG} # The version of your Terraform module to be published to your project's registry
|
||||
script:
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file path/to/file.tgz "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/terraform/modules/my-module/my-system/0.0.1/file"'
|
||||
- tar -cvzf ${TERRAFORM_MODULE_NAME}-${TERRAFORM_MODULE_SYSTEM}-${TERRAFORM_MODULE_VERSION}.tgz -C ${TERRAFORM_MODULE_DIR} --exclude=./.git .
|
||||
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ${TERRAFORM_MODULE_NAME}-${TERRAFORM_MODULE_SYSTEM}-${TERRAFORM_MODULE_VERSION}.tgz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/terraform/modules/${TERRAFORM_MODULE_NAME}/${TERRAFORM_MODULE_SYSTEM}/${TERRAFORM_MODULE_VERSION}/file'
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
```
|
||||
|
||||
To trigger this upload job, add a Git tag to your commit. The `rules:if: $CI_COMMIT_TAG` defines this so that not every commit to your repo triggers the upload.
|
||||
For other ways to control jobs in your CI/CD pipeline, refer to the [`.gitlab-ci.yml`](../../../ci/yaml/index.md) keyword reference.
|
||||
|
||||
## Example projects
|
||||
|
||||
For examples of the Terraform module registry, check the projects below:
|
||||
|
|
|
|||
|
|
@ -3,6 +3,10 @@
|
|||
redis_slot: code_review
|
||||
category: code_review
|
||||
aggregation: weekly
|
||||
- name: i_code_review_mr_with_invalid_approvers
|
||||
redis_slot: code_review
|
||||
category: code_review
|
||||
aggregation: weekly
|
||||
- name: i_code_review_user_single_file_diffs
|
||||
redis_slot: code_review
|
||||
category: code_review
|
||||
|
|
|
|||
|
|
@ -250,3 +250,7 @@ module Gitlab
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
# rubocop:disable Layout/LineLength
|
||||
Gitlab::UsageDataCounters::MergeRequestActivityUniqueCounter.prepend_mod_with('Gitlab::UsageDataCounters::MergeRequestActivityUniqueCounter')
|
||||
# rubocop:enable Layout/LineLength
|
||||
|
|
|
|||
|
|
@ -31938,6 +31938,9 @@ msgstr ""
|
|||
msgid "Replication"
|
||||
msgstr ""
|
||||
|
||||
msgid "Reply"
|
||||
msgstr ""
|
||||
|
||||
msgid "Reply by email"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module QA
|
||||
RSpec.describe 'Plan', :orchestrated, :smtp do
|
||||
RSpec.describe 'Plan', :orchestrated, :smtp, :reliable do
|
||||
describe 'Email Notification' do
|
||||
include Support::API
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module QA
|
||||
RSpec.describe 'Plan' do
|
||||
RSpec.describe 'Plan', :reliable do
|
||||
describe 'Custom issue templates' do
|
||||
let(:template_name) { 'custom_issue_template'}
|
||||
let(:template_content) { 'This is a custom issue template test' }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module QA
|
||||
RSpec.describe 'Plan' do
|
||||
RSpec.describe 'Plan', :reliable do
|
||||
describe 'filter issue comments activities' do
|
||||
before do
|
||||
Flow::Login.sign_in
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module QA
|
||||
RSpec.describe 'Plan' do
|
||||
RSpec.describe 'Plan', :reliable do
|
||||
describe 'Jira issue import', :jira, :orchestrated, :requires_admin do
|
||||
let(:jira_project_key) { "JITD" }
|
||||
let(:jira_issue_title) { "[#{jira_project_key}-1] Jira to GitLab Test Issue" }
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ RSpec.describe 'Group' do
|
|||
end
|
||||
|
||||
describe 'as a non-admin' do
|
||||
it 'creates a group and persists visibility radio selection', :js do
|
||||
it 'creates a group and persists visibility radio selection', :js, :saas do
|
||||
stub_application_setting(default_group_visibility: :private)
|
||||
|
||||
fill_in 'Group name', with: 'test-group'
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ RSpec.describe 'Merge request > User sees threads', :js do
|
|||
within(".discussion[data-discussion-id='#{discussion_id}']") do
|
||||
find_field('Reply…').click
|
||||
fill_in 'note[note]', with: 'Test!'
|
||||
click_button 'Comment'
|
||||
click_button 'Reply'
|
||||
|
||||
expect(page).to have_css('.note', count: 2)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ exports[`IDE pipeline stage renders stage details & icon 1`] = `
|
|||
|
||||
<gl-icon-stub
|
||||
class="ide-stage-collapse-icon"
|
||||
name="angle-down"
|
||||
name="chevron-lg-down"
|
||||
size="16"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,13 @@ describe('table_utility', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('thWidthPercent', () => {
|
||||
it('returns the width class including default table header classes', () => {
|
||||
const width = 50;
|
||||
expect(tableUtils.thWidthPercent(width)).toBe(`gl-w-${width}p`);
|
||||
});
|
||||
});
|
||||
|
||||
describe('sortObjectToString', () => {
|
||||
it('returns the expected sorting string ending in "DESC" when sortDesc is true', () => {
|
||||
expect(tableUtils.sortObjectToString({ sortBy: 'mergedAt', sortDesc: true })).toBe(
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ describe('~/nav/components/top_nav_menu_sections.vue', () => {
|
|||
menuItem: {
|
||||
id: 'home',
|
||||
view: 'home',
|
||||
icon: 'angle-left',
|
||||
icon: 'chevron-lg-left',
|
||||
},
|
||||
iconOnly: true,
|
||||
});
|
||||
|
|
@ -60,7 +60,7 @@ describe('~/nav/components/top_nav_menu_sections.vue', () => {
|
|||
|
||||
it('emits menu-item-click', () => {
|
||||
expect(wrapper.emitted()).toEqual({
|
||||
'menu-item-click': [[{ id: 'home', view: 'home', icon: 'angle-left' }]],
|
||||
'menu-item-click': [[{ id: 'home', view: 'home', icon: 'chevron-lg-left' }]],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -87,10 +87,27 @@ describe('noteable_discussion component', () => {
|
|||
|
||||
expect(noteFormProps.discussion).toBe(discussionMock);
|
||||
expect(noteFormProps.line).toBe(null);
|
||||
expect(noteFormProps.saveButtonTitle).toBe('Comment');
|
||||
expect(noteFormProps.autosaveKey).toBe(`Note/Issue/${discussionMock.id}/Reply`);
|
||||
});
|
||||
|
||||
it.each`
|
||||
noteType | isNoteInternal | saveButtonTitle
|
||||
${'public'} | ${false} | ${'Reply'}
|
||||
${'internal'} | ${true} | ${'Reply internally'}
|
||||
`(
|
||||
'reply button on form should have title "$saveButtonTitle" when note is $noteType',
|
||||
async ({ isNoteInternal, saveButtonTitle }) => {
|
||||
wrapper.setProps({ discussion: { ...discussionMock, confidential: isNoteInternal } });
|
||||
await nextTick();
|
||||
|
||||
const replyPlaceholder = wrapper.find(ReplyPlaceholder);
|
||||
replyPlaceholder.vm.$emit('focus');
|
||||
await nextTick();
|
||||
|
||||
expect(wrapper.find(NoteForm).props('saveButtonTitle')).toBe(saveButtonTitle);
|
||||
},
|
||||
);
|
||||
|
||||
it('should expand discussion', async () => {
|
||||
const discussion = { ...discussionMock, expanded: false };
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ describe('MRWidget approvals', () => {
|
|||
|
||||
it('approve action is rendered', () => {
|
||||
expect(findActionData()).toEqual({
|
||||
variant: 'info',
|
||||
variant: 'confirm',
|
||||
text: 'Approve',
|
||||
category: 'primary',
|
||||
});
|
||||
|
|
@ -192,7 +192,7 @@ describe('MRWidget approvals', () => {
|
|||
|
||||
it('approve action (with inverted style) is rendered', () => {
|
||||
expect(findActionData()).toEqual({
|
||||
variant: 'info',
|
||||
variant: 'confirm',
|
||||
text: 'Approve',
|
||||
category: 'secondary',
|
||||
});
|
||||
|
|
@ -208,7 +208,7 @@ describe('MRWidget approvals', () => {
|
|||
|
||||
it('approve additionally action is rendered', () => {
|
||||
expect(findActionData()).toEqual({
|
||||
variant: 'info',
|
||||
variant: 'confirm',
|
||||
text: 'Approve additionally',
|
||||
category: 'secondary',
|
||||
});
|
||||
|
|
|
|||
|
|
@ -245,9 +245,7 @@ RSpec.describe EmailsHelper do
|
|||
let(:logo_path) { 'spec/fixtures/logo_sample.svg' }
|
||||
|
||||
it 'returns the default header logo' do
|
||||
expect(header_logo).to match(
|
||||
%r{<img alt="GitLab" src="/images/mailers/gitlab_logo\.(?:gif|png)" width="\d+" height="\d+" />}
|
||||
)
|
||||
expect(header_logo).to match(default_header_logo)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ RSpec.describe 'Code review events' do
|
|||
|
||||
code_review_events = Gitlab::UsageDataCounters::HLLRedisCounter.events_for_category("code_review")
|
||||
|
||||
exceptions = %w[i_code_review_mr_diffs i_code_review_mr_single_file_diffs i_code_review_total_suggestions_applied i_code_review_total_suggestions_added i_code_review_create_note_in_ipynb_diff i_code_review_create_note_in_ipynb_diff_mr i_code_review_create_note_in_ipynb_diff_commit]
|
||||
exceptions = %w[i_code_review_mr_diffs i_code_review_mr_with_invalid_approvers i_code_review_mr_single_file_diffs i_code_review_total_suggestions_applied i_code_review_total_suggestions_added i_code_review_create_note_in_ipynb_diff i_code_review_create_note_in_ipynb_diff_mr i_code_review_create_note_in_ipynb_diff_commit]
|
||||
code_review_aggregated_events += exceptions
|
||||
|
||||
expect(code_review_events - code_review_aggregated_events).to be_empty
|
||||
|
|
|
|||
|
|
@ -71,19 +71,6 @@ RSpec.describe Namespace::RootStorageStatistics, type: :model do
|
|||
expect(root_storage_statistics.storage_size).to eq(total_storage_size)
|
||||
end
|
||||
|
||||
it 'does not aggregate container_repositories_size when FF is disabled' do
|
||||
stub_feature_flags(container_registry_namespace_statistics: false)
|
||||
|
||||
root_storage_statistics.recalculate!
|
||||
|
||||
root_storage_statistics.reload
|
||||
|
||||
total_storage_size = project_stat1.storage_size + project_stat2.storage_size
|
||||
|
||||
expect(root_storage_statistics.container_registry_size).to eq(0)
|
||||
expect(root_storage_statistics.storage_size).to eq(total_storage_size)
|
||||
end
|
||||
|
||||
it 'works when there are no projects' do
|
||||
Project.delete_all
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,31 @@ RSpec.shared_examples 'edits content using the content editor' do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'code block' do
|
||||
before do
|
||||
visit(profile_preferences_path)
|
||||
|
||||
find('.syntax-theme').choose('Dark')
|
||||
|
||||
wait_for_requests
|
||||
|
||||
page.go_back
|
||||
refresh
|
||||
|
||||
click_button 'Edit rich text'
|
||||
end
|
||||
|
||||
it 'applies theme classes to code blocks' do
|
||||
expect(page).not_to have_css('.content-editor-code-block.code.highlight.dark')
|
||||
|
||||
find(content_editor_testid).send_keys [:enter, :enter]
|
||||
find(content_editor_testid).send_keys '```js ' # trigger input rule
|
||||
find(content_editor_testid).send_keys 'var a = 0'
|
||||
|
||||
expect(page).to have_css('.content-editor-code-block.code.highlight.dark')
|
||||
end
|
||||
end
|
||||
|
||||
describe 'code block bubble menu' do
|
||||
it 'shows a code block bubble menu for a code block' do
|
||||
find(content_editor_testid).send_keys [:enter, :enter]
|
||||
|
|
|
|||
Loading…
Reference in New Issue