diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-10 18:10:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-10 18:10:10 +0000 |
commit | 69dec370722fbc4cfcb0ab4b59d86a770b45014c (patch) | |
tree | b6f3bd979006f6c246abc7151c8a12a218f2cda8 | |
parent | c642d6f861058068797fb5155d51c4c99797e4aa (diff) | |
download | gitlab-ce-69dec370722fbc4cfcb0ab4b59d86a770b45014c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
22 files changed, 137 insertions, 129 deletions
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 58a22384e63..e65c9179564 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -e49ea29543b2d8e71bfe4bdc3b295f785bd24fb1 +a3a94460be05799fdb5f9b4d1dab7832fe556bcd @@ -166,7 +166,7 @@ gem 'seed-fu', '~> 2.3.7' gem 'elasticsearch-model', '~> 7.2' gem 'elasticsearch-rails', '~> 7.2', require: 'elasticsearch/rails/instrumentation' gem 'elasticsearch-api', '7.13.3' -gem 'aws-sdk-core', '~> 3.156.0' +gem 'aws-sdk-core', '~> 3.159.0' gem 'aws-sdk-cloudformation', '~> 1' gem 'aws-sdk-s3', '~> 1.114.0' gem 'faraday_middleware-aws-sigv4', '~>0.3.0' diff --git a/Gemfile.checksum b/Gemfile.checksum index e637d099405..8d990adcd94 100644 --- a/Gemfile.checksum +++ b/Gemfile.checksum @@ -32,9 +32,9 @@ {"name":"awesome_print","version":"1.9.2","platform":"ruby","checksum":"e99b32b704acff16d768b3468680793ced40bfdc4537eb07e06a4be11133786e"}, {"name":"awrence","version":"1.1.1","platform":"ruby","checksum":"9be584c97408ed92d5e1ca11740853646fe270de675f2f8dd44e8233226dfc97"}, {"name":"aws-eventstream","version":"1.2.0","platform":"ruby","checksum":"ffa53482c92880b001ff2fb06919b9bb82fd847cbb0fa244985d2ebb6dd0d1df"}, -{"name":"aws-partitions","version":"1.638.0","platform":"ruby","checksum":"8dfe833a15e81cd586b2a9bc624c4800d6e4b003aa76f2e588972fd78be3941f"}, +{"name":"aws-partitions","version":"1.644.0","platform":"ruby","checksum":"63791750839afff110c5b5a8805018c4275720d7a5c7ec79319d4d520c7da874"}, {"name":"aws-sdk-cloudformation","version":"1.41.0","platform":"ruby","checksum":"31e47539719734413671edf9b1a31f8673fbf9688549f50c41affabbcb1c6b26"}, -{"name":"aws-sdk-core","version":"3.156.0","platform":"ruby","checksum":"0975d3894936dbaf9120dac7781245f177e8ba8f109100bd86a0711d4f9ee01d"}, +{"name":"aws-sdk-core","version":"3.159.0","platform":"ruby","checksum":"8863e2cdfd6816a0532ad9eb82a07b81b3d12667da747e9e82554e4dd7adb231"}, {"name":"aws-sdk-kms","version":"1.57.0","platform":"ruby","checksum":"ffd7dbb9b4251f29d4f508af761d0addd7035a346a88e3481cdb4dc548e51bd5"}, {"name":"aws-sdk-s3","version":"1.114.0","platform":"ruby","checksum":"ce0f71df1a7b0fb1f88d40a70636ef1a9b08e69fb560694c5dab3f4ac7efcde4"}, {"name":"aws-sigv4","version":"1.5.1","platform":"ruby","checksum":"d68c87fff4ee843b4b92b23c7f31f957f254ec6eb064181f7119124aab8b8bb4"}, diff --git a/Gemfile.lock b/Gemfile.lock index 8fe6f11c087..75d0c5ace89 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -191,11 +191,11 @@ GEM awesome_print (1.9.2) awrence (1.1.1) aws-eventstream (1.2.0) - aws-partitions (1.638.0) + aws-partitions (1.644.0) aws-sdk-cloudformation (1.41.0) aws-sdk-core (~> 3, >= 3.99.0) aws-sigv4 (~> 1.1) - aws-sdk-core (3.156.0) + aws-sdk-core (3.159.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) @@ -1547,7 +1547,7 @@ DEPENDENCIES autoprefixer-rails (= 10.2.5.1) awesome_print aws-sdk-cloudformation (~> 1) - aws-sdk-core (~> 3.156.0) + aws-sdk-core (~> 3.159.0) aws-sdk-s3 (~> 1.114.0) babosa (~> 1.0.4) base32 (~> 0.3.0) diff --git a/app/assets/javascripts/snippets/components/snippet_blob_view.vue b/app/assets/javascripts/snippets/components/snippet_blob_view.vue index 86cbc2c31b3..360ffdd34e0 100644 --- a/app/assets/javascripts/snippets/components/snippet_blob_view.vue +++ b/app/assets/javascripts/snippets/components/snippet_blob_view.vue @@ -53,7 +53,9 @@ export default { return { blobContent: '', activeViewerType: - this.blob?.richViewer && !window.location.hash ? RICH_BLOB_VIEWER : SIMPLE_BLOB_VIEWER, + this.blob?.richViewer && !window.location.hash?.startsWith('#LC') + ? RICH_BLOB_VIEWER + : SIMPLE_BLOB_VIEWER, }; }, computed: { diff --git a/app/assets/stylesheets/framework/lists.scss b/app/assets/stylesheets/framework/lists.scss index b27688dd04b..e9a507ebb6b 100644 --- a/app/assets/stylesheets/framework/lists.scss +++ b/app/assets/stylesheets/framework/lists.scss @@ -109,12 +109,6 @@ ul.content-list { color: $gl-text-color; word-break: break-word; - &.no-description { - .title { - line-height: $list-text-height; - } - } - .title { font-weight: $gl-font-weight-bold; } diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index ce707018eb6..088c12e8ab8 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -276,42 +276,24 @@ pre.light-well { /* * Projects list rendered on dashboard and user page */ + +.project-row { + .description p { + margin-bottom: 0; + color: $gl-text-color-secondary; + } +} + .projects-list { @include basic-list; display: flex; flex-direction: column; - // Disable Flexbox for admin page - &.admin-projects, - &.group-settings-projects { - display: block; - - .project-row { - display: block; - - .description > p { - margin-bottom: 0; - } - } - } - .project-row { @include basic-list-stats; display: flex; align-items: center; padding: $gl-padding-12 0; - - &.no-description { - @include media-breakpoint-up(sm) { - .avatar-container { - align-self: center; - } - - .metadata-info { - margin-bottom: 0; - } - } - } } h2 { diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index c27ff348f59..a1afb1ddbfa 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -1,7 +1,6 @@ - group = local_assigns.fetch(:group) -- css_class = "gl-display-flex!#{' no-description' if group.description.blank?}" -%li.group-row.gl-py-3.gl-align-items-center{ class: css_class, data: { qa_selector: 'group_row_content' } } +%li.group-row.gl-py-3.gl-align-items-center{ class: 'gl-display-flex!', data: { qa_selector: 'group_row_content' } } .avatar-container.rect-avatar.s40.gl-flex-shrink-0 = group_icon(group, class: "avatar s40") diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml index 33dfaee498a..c7c30673d74 100644 --- a/app/views/admin/projects/_projects.html.haml +++ b/app/views/admin/projects/_projects.html.haml @@ -1,33 +1,33 @@ .js-projects-list-holder - if @projects.any? - %ul.projects-list.content-list.admin-projects + %ul.content-list - @projects.each do |project| - %li.project-row{ class: ('no-description' if project.description.blank?) } - .controls - = render Pajamas::ButtonComponent.new(href: edit_project_path(project), button_options: { id: "edit_#{dom_id(project)}" }) do - = s_('Edit') - = render Pajamas::ButtonComponent.new(variant: :danger, button_options: { class: 'delete-project-button', data: { delete_project_url: admin_project_path(project), project_name: project.name } } ) do - = s_('AdminProjects|Delete') + %li.project-row.gl-align-items-center{ class: 'gl-display-flex!' } + .avatar-container.rect-avatar.s40.gl-flex-shrink-0 + = project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40) + .gl-min-w-0.gl-flex-grow-1 + .title + = link_to(admin_project_path(project)) do + %span.project-full-name + %span.namespace-name + - if project.namespace + = project.namespace.human_name + \/ + %span.project-name + = project.name - .stats + - if project.description.present? + .description + = markdown_field(project, :description) + .stats.gl-text-gray-500.gl-flex-shrink-0.gl-display-none.gl-sm-display-flex = gl_badge_tag storage_counter(project.statistics&.storage_size) = render_if_exists 'admin/projects/archived', project: project - .title - = link_to(admin_project_path(project)) do - .dash-project-avatar - .avatar-container.rect-avatar.s40 - = project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40) - %span.project-full-name - %span.namespace-name - - if project.namespace - = project.namespace.human_name - \/ - %span.project-name - = project.name - - if project.description.present? - .description - = markdown_field(project, :description) + .controls.gl-flex-shrink-0.gl-ml-5 + = render Pajamas::ButtonComponent.new(href: edit_project_path(project), button_options: { id: dom_id(project, :edit) }) do + = s_('Edit') + = render Pajamas::ButtonComponent.new(variant: :danger, button_options: { class: 'delete-project-button', data: { delete_project_url: admin_project_path(project), project_name: project.name } } ) do + = s_('AdminProjects|Delete') = paginate @projects, theme: 'gitlab' - else diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index eabb7e51227..a60c3996cf2 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -2,7 +2,6 @@ - add_to_breadcrumbs _("Projects"), admin_projects_path - breadcrumb_title @project.full_name - page_title @project.full_name, _("Projects") -- @content_class = "admin-projects" - current_user_is_group_owner = @group && @group.has_owner?(current_user) %h1.page-title.gl-font-size-h-display diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml index 1ca85812f68..d5511c2cb49 100644 --- a/app/views/groups/projects.html.haml +++ b/app/views/groups/projects.html.haml @@ -12,38 +12,36 @@ = link_to new_project_path(namespace_id: @group.id), class: "btn gl-button btn-sm btn-confirm" do New project - c.body do - %ul.projects-list.content-list.group-settings-projects + %ul.content-list - @projects.each do |project| - %li.project-row{ class: ('no-description' if project.description.blank?) } - .controls - = render Pajamas::ButtonComponent.new(href: project_project_members_path(project), button_options: { id: "edit_#{dom_id(project)}" }) do - = _('Members') - = render Pajamas::ButtonComponent.new(href: edit_project_path(project), button_options: { id: "edit_#{dom_id(project)}" }) do - = _('Edit') - = render 'delete_project_button', project: project + %li.project-row.gl-align-items-center{ class: 'gl-display-flex!' } + .avatar-container.rect-avatar.s40.gl-flex-shrink-0 + = project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40) + .gl-min-w-0.gl-flex-grow-1 + .title + = link_to project_path(project), class: 'js-prefetch-document' do + %span.project-full-name + %span.namespace-name + - if project.namespace + = project.namespace.human_name + \/ + %span.project-name + = project.name + %span{ class: visibility_level_color(project.visibility_level) } + = visibility_level_icon(project.visibility_level) + + - if project.description.present? + .description + = markdown_field(project, :description) - .stats + .stats.gl-text-gray-500.gl-flex-shrink-0.gl-display-none.gl-sm-display-flex = gl_badge_tag storage_counter(project.statistics&.storage_size) = render 'project_badges', project: project - .title - = link_to project_path(project), class: 'js-prefetch-document' do - .dash-project-avatar - .avatar-container.rect-avatar.s40 - = project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40) - %span.project-full-name - %span.namespace-name - - if project.namespace - = project.namespace.human_name - \/ - %span.project-name - = project.name - %span{ class: visibility_level_color(project.visibility_level) } - = visibility_level_icon(project.visibility_level) - - - if project.description.present? - .description - = markdown_field(project, :description) + .controls.gl-flex-shrink-0.gl-ml-5 + = link_to _('Members'), project_project_members_path(project), id: dom_id(project, :edit), class: "btn gl-button" + = link_to _('Edit'), edit_project_path(project), id: dom_id(project, :edit), class: "btn gl-button" + = render 'delete_project_button', project: project - if @projects.blank? .nothing-here-block This group has no projects yet diff --git a/app/views/shared/blob/_markdown_buttons.html.haml b/app/views/shared/blob/_markdown_buttons.html.haml index 6eae3123ba0..db53d78dadb 100644 --- a/app/views/shared/blob/_markdown_buttons.html.haml +++ b/app/views/shared/blob/_markdown_buttons.html.haml @@ -35,7 +35,7 @@ = markdown_toolbar_button({ icon: "details-block", data: { "md-tag" => "<details><summary>Click to expand</summary>\n{text}\n</details>", "md-prepend" => true, "md-select" => "Click to expand" }, title: _("Add a collapsible section") }) - = markdown_toolbar_button({ icon: "table", data: { "md-tag" => "| header | header |\n| ------ | ------ |\n| cell | cell |\n| cell | cell |", "md-prepend" => true }, title: _("Add a table") }) + = markdown_toolbar_button({ icon: "table", data: { "md-tag" => "| header | header |\n| ------ | ------ |\n| | |\n| | |", "md-prepend" => true }, title: _("Add a table") }) - if supports_file_upload = render Pajamas::ButtonComponent.new(icon: 'paperclip', category: :tertiary, button_options: { 'aria-label': _("Attach a file or image"), class: 'has-tooltip js-attach-file-button', data: { testid: 'button-attach-file', container: 'body' } }) - if show_fullscreen_button diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index 0ee901a8ff3..49699ae54bc 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -9,7 +9,7 @@ - compact_mode = false unless local_assigns[:compact_mode] == true - show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true && can_show_last_commit_in_list?(project) - css_class = '' unless local_assigns[:css_class] -- css_class += " no-description" if project.description.blank? && !show_last_commit_as_description +- css_class += " gl-display-flex!" - cache_key = project_list_cache_key(project, pipeline_status: pipeline_status) - updated_tooltip = time_ago_with_tooltip(project.last_activity_date) - show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) @@ -18,7 +18,7 @@ - css_controls_class << "with-pipeline-status" if show_pipeline_status_icon && last_pipeline.present? - avatar_container_class = project.creator && use_creator_avatar ? '' : 'rect-avatar' -%li.project-row.d-flex{ class: css_class } +%li.project-row.gl-align-items-center{ class: css_class } = cache(cache_key) do - if avatar .flex-grow-0.flex-shrink-0{ class: avatar_container_class } diff --git a/app/views/shared/runners/_shared_runners_description.html.haml b/app/views/shared/runners/_shared_runners_description.html.haml index 2779901ca0c..01b601ef986 100644 --- a/app/views/shared/runners/_shared_runners_description.html.haml +++ b/app/views/shared/runners/_shared_runners_description.html.haml @@ -1,11 +1,12 @@ -# "MaxBuilds" is a runner configuration keyword so it must not be translated. - link = link_to 'MaxBuilds', 'https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersmachine-section', target: '_blank', rel: 'noopener noreferrer' +- shared_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('ci/runners/runners_scope.md', anchor: 'shared-runners') } %h4 = _('Shared runners') .bs-callout{ data: { testid: 'shared-runners-description' } } - %p= _('These runners are shared across this GitLab instance.') + %p= s_('Runners|%{link_start}These runners%{link_end} are available to all groups and projects.').html_safe % { link_start: shared_link_start, link_end: '</a>'.html_safe } - if Gitlab::CurrentSettings.shared_runners_text.present? = markdown(Gitlab::CurrentSettings.current_application_settings.shared_runners_text) - else diff --git a/doc/architecture/blueprints/pods/index.md b/doc/architecture/blueprints/pods/index.md index 610370b8e6e..523616a9354 100644 --- a/doc/architecture/blueprints/pods/index.md +++ b/doc/architecture/blueprints/pods/index.md @@ -166,17 +166,17 @@ Introducing organizations allows GitLab to move towards a multi-tenant system th Organizations solve the following problems: -1. We can group top-level namespaces by organization. This eliminates the difference between self-managed and GitLab.com. It is very similar to the initial concept of "instance groups". For example these two top-level namespaces would belong to the organization `GitLab`: +1. We can group top-level namespaces by organization. It is very similar to the initial concept of "instance groups". For example these two top-level namespaces would belong to the organization `GitLab`: 1. `https://gitlab.com/gitlab-org/` 1. `https://gitlab.com/gitlab-com/` 1. We can isolate organizations from each other. Top-level namespaces of the same organization can interact within organizations but are not allowed to interact with other namespaces in other organizations. This is useful for customers because it means an organization provides clear boundaries - similar to a self-managed instance. This means we don't have to aggregate user dashboards across everything and can locally scope them to organizations. 1. We don't need to define hierarchies inside an organization. It is a container that could be filled with whatever hierarchy / entity set makes sense (workspaces, top-level namespaces etc.) -1. Self-managed instances would set a default organization. One organization per instance. -1. Organizations can control user-profiles in a central way. This could be achieved by having an organization specific user-profile. Such a profile makes it possible for the organization administrators to control the user role in a company, enforce user e-mails, or show a graphical indicator of a user being part of the organization. An example would be a "GitLab Employee stamp" on comments. +1. Self-managed instances would set a default organization. +1. Organizations can control user-profiles in a central way. This could be achieved by having an organization specific user-profile. Such a profile makes it possible for the organization administrators to control the user role in a company, enforce user emails, or show a graphical indicator of a user being part of the organization. An example would be a "GitLab Employee stamp" on comments. ![Move to Organizations](2022-10-05-Pods-Organizations-Iteration0.png) -### Why would customers opt-in to Organizations? +#### Why would customers opt-in to Organizations? By introducing organizations and Pods we can improve the reliability, performance and availability of our SaaS Platforms. @@ -186,7 +186,7 @@ Future iterations would create additional value but are beyond the scope of this Organizations will likely be required in the future as well. -### Initial user experience +#### Initial user experience 1. We create a default `GitLab.com public` organization and assign all public top-level namespaces to it. This allows existing users to access all the data on GitLab.com, exactly as it does now. 1. Any user wanting to opt-in to the benefits of organizations will need to set a single default organization. Any attempts for these users to load a global page like `/dashboard` will end up redirecting to `/-/organizations/<DEFAULT_ORGANIZATION>/dashboard`. diff --git a/doc/development/emails.md b/doc/development/emails.md index 375107020e6..2d03d8bca2f 100644 --- a/doc/development/emails.md +++ b/doc/development/emails.md @@ -176,7 +176,7 @@ in the Helm Chart configuration rather than the `Gemfile`. #### Preserving backwards compatibility -Removing the `Gemfile` would break incoming e-mail processing for source +Removing the `Gemfile` would break incoming email processing for source installs. For now, source installs are advised to upgrade manually to the version specified in Omnibus and run `bin/mail_room` directly as done with Omnibus. diff --git a/doc/install/docker.md b/doc/install/docker.md index 6b4c0308c26..aacbbf5b79f 100644 --- a/doc/install/docker.md +++ b/doc/install/docker.md @@ -298,7 +298,7 @@ sudo docker exec -it gitlab editor /etc/gitlab/gitlab.rb Once you open `/etc/gitlab/gitlab.rb` make sure to set the `external_url` to point to a valid URL. -To receive e-mails from GitLab you have to configure the +To receive emails from GitLab you have to configure the [SMTP settings](https://docs.gitlab.com/omnibus/settings/smtp.html) because the GitLab Docker image doesn't have an SMTP server installed. You may also be interested in [enabling HTTPS](https://docs.gitlab.com/omnibus/settings/ssl.html). diff --git a/doc/subscriptions/index.md b/doc/subscriptions/index.md index 2d809ed7ef8..93a0b46f206 100644 --- a/doc/subscriptions/index.md +++ b/doc/subscriptions/index.md @@ -168,7 +168,7 @@ Only one namespace can be linked to a subscription. To change the password for this customers portal account: 1. Log in to the [Customers Portal](https://customers.gitlab.com/customers/sign_in). -1. Select the **My account** drop-down and select **Account details**. +1. Select the **My account** dropdown list and select **Account details**. 1. Make the required changes to the **Your password** section. 1. Select **Save changes**. diff --git a/doc/user/admin_area/settings/project_integration_management.md b/doc/user/admin_area/settings/project_integration_management.md index 2b634384272..d50e02a14d4 100644 --- a/doc/user/admin_area/settings/project_integration_management.md +++ b/doc/user/admin_area/settings/project_integration_management.md @@ -122,7 +122,7 @@ Resetting a group-level default setting removes integrations that use default se 1. Navigate to **Project > Settings > Integrations**. 1. Choose the integration you want to enable or update. -1. From the drop-down, select **Use default settings**. +1. From the dropdown list, select **Use default settings**. 1. Ensure the toggle is set to **Enable integration**. 1. Select **Save changes**. @@ -130,6 +130,6 @@ Resetting a group-level default setting removes integrations that use default se 1. Navigate to project or group's **Settings > Integrations**. 1. Choose the integration you want to enable or update. -1. From the drop-down, select **Use custom settings**. +1. From the dropdown list, select **Use custom settings**. 1. Ensure the toggle is set to **Enable integration** and enter all required settings. 1. Select **Save changes**. diff --git a/doc/user/project/merge_requests/creating_merge_requests.md b/doc/user/project/merge_requests/creating_merge_requests.md index 8d462fef15a..df11d5a1d8d 100644 --- a/doc/user/project/merge_requests/creating_merge_requests.md +++ b/doc/user/project/merge_requests/creating_merge_requests.md @@ -96,8 +96,8 @@ You can create a merge request from your fork to contribute back to the main pro 1. On the top bar, select **Main menu > Projects** and find your project. 1. Select your fork of the repository. 1. On the left menu, go to **Merge requests**, and select **New merge request**. -1. In the **Source branch** drop-down list box, select the branch in your forked repository as the source branch. -1. In the **Target branch** drop-down list box, select the branch from the upstream repository as the target branch. +1. In the **Source branch** dropdown list box, select the branch in your forked repository as the source branch. +1. In the **Target branch** dropdown list box, select the branch from the upstream repository as the target branch. You can set a [default target project](#set-the-default-target-project) to change the default target branch (which can be useful if you are working in a forked project). diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 7f84d6012d4..548a7f38cca 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -34490,6 +34490,9 @@ msgid_plural "Runners|%d selected runners deleted" msgstr[0] "" msgstr[1] "" +msgid "Runners|%{link_start}These runners%{link_end} are available to all groups and projects." +msgstr "" + msgid "Runners|%{percentage} spot." msgstr "" @@ -40797,9 +40800,6 @@ msgstr "" msgid "These runners are shared across projects in this group." msgstr "" -msgid "These runners are shared across this GitLab instance." -msgstr "" - msgid "These runners are specific to this project." msgstr "" diff --git a/spec/frontend/snippets/components/snippet_blob_view_spec.js b/spec/frontend/snippets/components/snippet_blob_view_spec.js index 74671c3fc1d..c7ff8c21d80 100644 --- a/spec/frontend/snippets/components/snippet_blob_view_spec.js +++ b/spec/frontend/snippets/components/snippet_blob_view_spec.js @@ -169,36 +169,69 @@ describe('Blob Embeddable', () => { }); describe('URLS with hash', () => { - beforeEach(() => { - window.location.hash = '#LC2'; - }); - afterEach(() => { window.location.hash = ''; }); - it('renders simple viewer by default if URL contains hash', () => { - createComponent({ - data: {}, + describe('if hash starts with #LC', () => { + beforeEach(() => { + window.location.hash = '#LC2'; }); - expect(wrapper.vm.activeViewerType).toBe(SimpleViewerMock.type); - expect(wrapper.findComponent(SimpleViewer).exists()).toBe(true); + it('renders simple viewer by default', () => { + createComponent({ + data: {}, + }); + + expect(wrapper.vm.activeViewerType).toBe(SimpleViewerMock.type); + expect(wrapper.findComponent(SimpleViewer).exists()).toBe(true); + }); + + describe('switchViewer()', () => { + it('switches to the passed viewer', async () => { + createComponent(); + + wrapper.vm.switchViewer(RichViewerMock.type); + + await nextTick(); + expect(wrapper.vm.activeViewerType).toBe(RichViewerMock.type); + expect(wrapper.findComponent(RichViewer).exists()).toBe(true); + + await wrapper.vm.switchViewer(SimpleViewerMock.type); + expect(wrapper.vm.activeViewerType).toBe(SimpleViewerMock.type); + expect(wrapper.findComponent(SimpleViewer).exists()).toBe(true); + }); + }); }); - describe('switchViewer()', () => { - it('switches to the passed viewer', async () => { - createComponent(); + describe('if hash starts with anything else', () => { + beforeEach(() => { + window.location.hash = '#last-headline'; + }); - wrapper.vm.switchViewer(RichViewerMock.type); + it('renders rich viewer by default', () => { + createComponent({ + data: {}, + }); - await nextTick(); expect(wrapper.vm.activeViewerType).toBe(RichViewerMock.type); expect(wrapper.findComponent(RichViewer).exists()).toBe(true); + }); - await wrapper.vm.switchViewer(SimpleViewerMock.type); - expect(wrapper.vm.activeViewerType).toBe(SimpleViewerMock.type); - expect(wrapper.findComponent(SimpleViewer).exists()).toBe(true); + describe('switchViewer()', () => { + it('switches to the passed viewer', async () => { + createComponent(); + + wrapper.vm.switchViewer(SimpleViewerMock.type); + + await nextTick(); + expect(wrapper.vm.activeViewerType).toBe(SimpleViewerMock.type); + expect(wrapper.findComponent(SimpleViewer).exists()).toBe(true); + + await wrapper.vm.switchViewer(RichViewerMock.type); + expect(wrapper.vm.activeViewerType).toBe(RichViewerMock.type); + expect(wrapper.findComponent(RichViewer).exists()).toBe(true); + }); }); }); }); |