Commit 8ef39a26 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch 'mw-update-docs-add-icon-helper-deprecation-note' into 'master'

Add deprecation note for icon helper to frontend guidelines

See merge request gitlab-org/gitlab!48869
parents 495d1574 8ee3a28e
...@@ -85,6 +85,7 @@ export default { ...@@ -85,6 +85,7 @@ export default {
v-model="filter" v-model="filter"
:placeholder="$options.i18n.searchPlaceholder" :placeholder="$options.i18n.searchPlaceholder"
class="gl-align-self-center gl-ml-auto fork-filtered-search" class="gl-align-self-center gl-ml-auto fork-filtered-search"
data-qa-selector="fork_groups_list_search_field"
/> />
</template> </template>
</gl-tabs> </gl-tabs>
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
export default { export default {
components: {
GlIcon,
},
props: { props: {
user: { user: {
type: Object, type: Object,
...@@ -46,6 +50,6 @@ export default { ...@@ -46,6 +50,6 @@ export default {
class="avatar avatar-inline m-0" class="avatar avatar-inline m-0"
data-qa-selector="avatar_image" data-qa-selector="avatar_image"
/> />
<i v-if="hasMergeIcon" aria-hidden="true" class="fa fa-exclamation-triangle merge-icon"></i> <gl-icon v-if="hasMergeIcon" name="warning-solid" aria-hidden="true" class="merge-icon" />
</span> </span>
</template> </template>
...@@ -112,11 +112,12 @@ export default { ...@@ -112,11 +112,12 @@ export default {
/> />
<button v-if="hasMoreThanTwoAssignees" class="btn-link" type="button"> <button v-if="hasMoreThanTwoAssignees" class="btn-link" type="button">
<span class="avatar-counter sidebar-avatar-counter"> {{ sidebarAvatarCounter }} </span> <span class="avatar-counter sidebar-avatar-counter"> {{ sidebarAvatarCounter }} </span>
<i <gl-icon
v-if="isMergeRequest && !allAssigneesCanMerge" v-if="isMergeRequest && !allAssigneesCanMerge"
name="warning-solid"
aria-hidden="true" aria-hidden="true"
class="fa fa-exclamation-triangle merge-icon" class="merge-icon"
></i> />
</button> </button>
</div> </div>
</template> </template>
...@@ -97,11 +97,12 @@ export default { ...@@ -97,11 +97,12 @@ export default {
<collapsed-reviewer v-for="user in collapsedUsers" :key="user.id" :user="user" /> <collapsed-reviewer v-for="user in collapsedUsers" :key="user.id" :user="user" />
<button v-if="hasMoreThanTwoReviewers" class="btn-link" type="button"> <button v-if="hasMoreThanTwoReviewers" class="btn-link" type="button">
<span class="avatar-counter sidebar-avatar-counter"> {{ sidebarAvatarCounter }} </span> <span class="avatar-counter sidebar-avatar-counter"> {{ sidebarAvatarCounter }} </span>
<i <gl-icon
v-if="!allReviewersCanMerge" v-if="!allReviewersCanMerge"
name="warning-solid"
aria-hidden="true" aria-hidden="true"
class="fa fa-exclamation-triangle merge-icon" class="merge-icon"
></i> />
</button> </button>
</div> </div>
</template> </template>
<script> <script>
// NOTE! For the first iteration, we are simply copying the implementation of Assignees // NOTE! For the first iteration, we are simply copying the implementation of Assignees
// It will soon be overhauled in Issue https://gitlab.com/gitlab-org/gitlab/-/issues/233736 // It will soon be overhauled in Issue https://gitlab.com/gitlab-org/gitlab/-/issues/233736
import { GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
export default { export default {
components: {
GlIcon,
},
props: { props: {
user: { user: {
type: Object, type: Object,
...@@ -38,6 +42,6 @@ export default { ...@@ -38,6 +42,6 @@ export default {
class="avatar avatar-inline m-0" class="avatar avatar-inline m-0"
data-qa-selector="avatar_image" data-qa-selector="avatar_image"
/> />
<i v-if="hasMergeIcon" aria-hidden="true" class="fa fa-exclamation-triangle merge-icon"></i> <gl-icon v-if="hasMergeIcon" name="warning-solid" aria-hidden="true" class="merge-icon" />
</span> </span>
</template> </template>
...@@ -796,7 +796,7 @@ UsersSelect.prototype.renderRowAvatar = function(issuableType, user, img) { ...@@ -796,7 +796,7 @@ UsersSelect.prototype.renderRowAvatar = function(issuableType, user, img) {
const mergeIcon = const mergeIcon =
issuableType === 'merge_request' && !user.can_merge issuableType === 'merge_request' && !user.can_merge
? `${spriteIcon('warning-solid', 's12 merge-icon')}` ? spriteIcon('warning-solid', 's12 merge-icon')
: ''; : '';
return `<span class="position-relative mr-2"> return `<span class="position-relative mr-2">
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;
text-shadow: -1px -1px 2px $white, 1px -1px 2px $white, -1px 1px 2px $white, 1px 1px 2px $white; filter: drop-shadow(0 0 0.5px $white) drop-shadow(0 0 1px $white) drop-shadow(0 0 2px $white);
} }
} }
...@@ -392,6 +392,13 @@ ...@@ -392,6 +392,13 @@
text-align: center; text-align: center;
} }
.merge-icon {
height: 12px;
width: 12px;
bottom: -5px;
right: 4px;
}
.sidebar-collapsed-icon { .sidebar-collapsed-icon {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -402,7 +409,7 @@ ...@@ -402,7 +409,7 @@
text-align: center; text-align: center;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
svg { > svg {
fill: $gl-text-color-secondary; fill: $gl-text-color-secondary;
} }
...@@ -410,7 +417,7 @@ ...@@ -410,7 +417,7 @@
&:hover .todo-undone { &:hover .todo-undone {
color: $gl-text-color; color: $gl-text-color;
svg { > svg {
fill: $gl-text-color; fill: $gl-text-color;
} }
} }
...@@ -482,10 +489,6 @@ ...@@ -482,10 +489,6 @@
display: none; display: none;
} }
.merge-icon {
font-size: 10px;
}
.multiple-users { .multiple-users {
position: relative; position: relative;
height: 24px; height: 24px;
......
...@@ -287,10 +287,6 @@ $mr-widget-min-height: 69px; ...@@ -287,10 +287,6 @@ $mr-widget-min-height: 69px;
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
&.has-conflicts .fa-exclamation-triangle {
color: $orange-500;
}
time { time {
font-weight: $gl-font-weight-normal; font-weight: $gl-font-weight-normal;
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
- if current_user.admin? - if current_user.admin?
.text-warning .text-warning
%p %p
= icon("exclamation-triangle fw") = sprite_icon('warning-solid')
= html_escape(_('You are an admin, which means granting access to %{client_name} will allow them to interact with GitLab as an admin as well. Proceed with caution.')) % { client_name: tag.strong(@pre_auth.client.name) } = html_escape(_('You are an admin, which means granting access to %{client_name} will allow them to interact with GitLab as an admin as well. Proceed with caution.')) % { client_name: tag.strong(@pre_auth.client.name) }
%p %p
- link_to_client = link_to(@pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer') - link_to_client = link_to(@pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer')
......
- if project.archived? - if project.archived?
.text-warning.center.prepend-top-20 .text-warning.center.prepend-top-20
%p %p
= icon("exclamation-triangle fw") = sprite_icon('warning-solid')
= _('Archived project! Repository and other project resources are read only') = _('Archived project! Repository and other project resources are read only')
%h4 %h4
= icon('exclamation-triangle') = sprite_icon('warning-solid')
This merge request failed to be merged automatically This merge request failed to be merged automatically
%p %p
......
%tr.tree-truncated-warning %tr.tree-truncated-warning
%td{ colspan: '3' } %td{ colspan: '3' }
= icon('exclamation-triangle fw') = sprite_icon('warning-solid')
%span %span
Too many items to show. To preserve performance only Too many items to show. To preserve performance only
%strong #{number_with_delimiter(limit)} of #{number_with_delimiter(total)} %strong #{number_with_delimiter(limit)} of #{number_with_delimiter(total)}
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
- if referenced_users - if referenced_users
.referenced-users.hide .referenced-users.hide
%span %span
= icon("exclamation-triangle") = sprite_icon('warning-solid')
You are about to add You are about to add
%strong %strong
%span.js-referenced-users-count 0 %span.js-referenced-users-count 0
......
...@@ -2021,7 +2021,7 @@ ...@@ -2021,7 +2021,7 @@
:urgency: :low :urgency: :low
:resource_boundary: :unknown :resource_boundary: :unknown
:weight: 1 :weight: 1
:idempotent: :idempotent: true
:tags: [] :tags: []
- :name: self_monitoring_project_create - :name: self_monitoring_project_create
:feature_category: :metrics :feature_category: :metrics
......
# frozen_string_literal: true # frozen_string_literal: true
class RepositoryUpdateRemoteMirrorWorker # rubocop:disable Scalability/IdempotentWorker class RepositoryUpdateRemoteMirrorWorker
UpdateError = Class.new(StandardError) UpdateError = Class.new(StandardError)
include ApplicationWorker include ApplicationWorker
...@@ -11,6 +11,7 @@ class RepositoryUpdateRemoteMirrorWorker # rubocop:disable Scalability/Idempoten ...@@ -11,6 +11,7 @@ class RepositoryUpdateRemoteMirrorWorker # rubocop:disable Scalability/Idempoten
sidekiq_options retry: 3, dead: false sidekiq_options retry: 3, dead: false
feature_category :source_code_management feature_category :source_code_management
loggable_arguments 1 loggable_arguments 1
idempotent!
LOCK_WAIT_TIME = 30.seconds LOCK_WAIT_TIME = 30.seconds
MAX_TRIES = 3 MAX_TRIES = 3
......
---
title: Replace fa-exclamation-triangle icons with GitLab SVG warning-solid icon
merge_request: 47089
author:
type: changed
--- ---
name: branch_list_keyset_pagination name: branch_list_keyset_pagination
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35819 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35819
rollout_issue_url: rollout_issue_url:
milestone: '13.2' milestone: '13.2'
type: development type: development
group: group::source code group: group::source code
default_enabled: false default_enabled: true
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
.form-group.gl-mb-3 .form-group.gl-mb-3
.form-check .form-check
= f.check_box :prevent_forking_outside_group, checked: group.prevent_forking_outside_group?, class: 'form-check-input', disabled: !can_change_prevent_forking?(current_user, group) = f.check_box :prevent_forking_outside_group, checked: group.prevent_forking_outside_group?, class: 'form-check-input', disabled: !can_change_prevent_forking?(current_user, group), data: { qa_selector: 'prevent_forking_outside_group_checkbox' }
= f.label :prevent_forking_outside_group, class: 'form-check-label' do = f.label :prevent_forking_outside_group, class: 'form-check-label' do
%span.gl-display-block= s_('GroupSettings|Prevent forking outside of the group') %span.gl-display-block= s_('GroupSettings|Prevent forking outside of the group')
%span.text-muted= s_('GroupSettings|This setting will prevent group members from forking projects outside of the group.') %span.text-muted= s_('GroupSettings|This setting will prevent group members from forking projects outside of the group.')
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
- if project.archived? - if project.archived?
.text-warning.center.prepend-top-20 .text-warning.center.prepend-top-20
%p %p
= icon("exclamation-triangle fw") = sprite_icon('warning-solid')
= _('Archived project! Repository and other project resources are read-only') = _('Archived project! Repository and other project resources are read-only')
- if project.marked_for_deletion? - if project.marked_for_deletion?
.text-warning.center.prepend-top-20 .text-warning.center.prepend-top-20
%p %p
= icon("exclamation-triangle fw") = sprite_icon('warning-solid')
= _("Deletion pending. This project will be removed on %{date}. Repository and other project resources are read-only.") % { date: permanent_deletion_date(project.marked_for_deletion_at) } = _("Deletion pending. This project will be removed on %{date}. Repository and other project resources are read-only.") % { date: permanent_deletion_date(project.marked_for_deletion_at) }
- if @project.mirror_ever_updated_successfully? && @repository.diverged_from_upstream?(branch.name) - if @project.mirror_ever_updated_successfully? && @repository.diverged_from_upstream?(branch.name)
%span.badge.badge-danger.gl-ml-2.has-tooltip{ data: { html: "true", title: branch_diverged_tooltip_message } } %span.badge.badge-danger.gl-ml-2.has-tooltip{ data: { html: "true", title: branch_diverged_tooltip_message } }
= icon('exclamation-triangle') = sprite_icon('warning-solid')
= s_('Branches|diverged from upstream') = s_('Branches|diverged from upstream')
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- if @ref.present? && @project.mirror_ever_updated_successfully? && @repository.diverged_from_upstream?(@ref) - if @ref.present? && @project.mirror_ever_updated_successfully? && @repository.diverged_from_upstream?(@ref)
%span.has-tooltip{ data: { html: "true", title: branch_diverged_tooltip_message } } %span.has-tooltip{ data: { html: "true", title: branch_diverged_tooltip_message } }
= icon('exclamation-triangle') = sprite_icon('warning-solid')
This branch has diverged from upstream. This branch has diverged from upstream.
.project-mirror-button .project-mirror-button
= render "shared/mirror_update_button" = render "shared/mirror_update_button"
- error_messages = @project.repository_size_checker.error_message - error_messages = @project.repository_size_checker.error_message
%h4.size-limit-reached %h4.size-limit-reached
= icon("exclamation-triangle") = sprite_icon('warning-solid')
= error_messages.merge_error = error_messages.merge_error
%p %p
......
import { GlTooltip, GlIcon } from '@gitlab/ui'; import { GlTooltip, GlIcon, GlLoadingIcon } from '@gitlab/ui';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import Vue from 'vue'; import Vue from 'vue';
import DeployBoard from 'ee/environments/components/deploy_board_component.vue'; import DeployBoard from 'ee/environments/components/deploy_board_component.vue';
...@@ -95,7 +95,7 @@ describe('Deploy Board', () => { ...@@ -95,7 +95,7 @@ describe('Deploy Board', () => {
}); });
it('should render loading spinner', () => { it('should render loading spinner', () => {
expect(wrapper.find('.fa-spin')).toBeDefined(); expect(wrapper.find(GlLoadingIcon).exists()).toBe(true);
}); });
}); });
......
...@@ -26,11 +26,11 @@ module Gitlab ...@@ -26,11 +26,11 @@ module Gitlab
private private
def keyset_pagination_enabled? def keyset_pagination_enabled?
Feature.enabled?(:branch_list_keyset_pagination, project) && params[:pagination] == 'keyset' Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: true) && params[:pagination] == 'keyset'
end end
def paginate_first_page? def paginate_first_page?
Feature.enabled?(:branch_list_keyset_pagination, project) && (params[:page].blank? || params[:page].to_i == 1) Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: true) && (params[:page].blank? || params[:page].to_i == 1)
end end
def paginate_via_gitaly(finder) def paginate_via_gitaly(finder)
......
...@@ -29,6 +29,10 @@ module QA ...@@ -29,6 +29,10 @@ module QA
element :membership_lock_checkbox element :membership_lock_checkbox
end end
view 'ee/app/views/groups/settings/_prevent_forking.html.haml' do
element :prevent_forking_outside_group_checkbox
end
view 'ee/app/views/shared/_repository_size_limit_setting.html.haml' do view 'ee/app/views/shared/_repository_size_limit_setting.html.haml' do
element :repository_size_limit_field element :repository_size_limit_field
end end
...@@ -88,6 +92,18 @@ module QA ...@@ -88,6 +92,18 @@ module QA
click_element :save_permissions_changes_button click_element :save_permissions_changes_button
end end
def set_prevent_forking_outside_group_enabled
expand_content :permission_lfs_2fa_content
check_element :prevent_forking_outside_group_checkbox
click_element :save_permissions_changes_button
end
def set_prevent_forking_outside_group_disabled
expand_content :permission_lfs_2fa_content
uncheck_element :prevent_forking_outside_group_checkbox
click_element :save_permissions_changes_button
end
def set_repository_size_limit(limit) def set_repository_size_limit(limit)
find_element(:repository_size_limit_field).set limit find_element(:repository_size_limit_field).set limit
end end
......
...@@ -228,7 +228,7 @@ module QA ...@@ -228,7 +228,7 @@ module QA
def finished_loading_block? def finished_loading_block?
wait_for_requests wait_for_requests
has_no_css?('.fa-spinner.block-loading', wait: Capybara.default_max_wait_time) has_no_css?('.gl-spinner', wait: Capybara.default_max_wait_time)
end end
def has_loaded_all_images? def has_loaded_all_images?
......
...@@ -9,9 +9,17 @@ module QA ...@@ -9,9 +9,17 @@ module QA
element :fork_namespace_button element :fork_namespace_button
end end
view 'app/assets/javascripts/pages/projects/forks/new/components/fork_groups_list.vue' do
element :fork_groups_list_search_field
end
def choose_namespace(namespace = Runtime::Namespace.path) def choose_namespace(namespace = Runtime::Namespace.path)
click_element(:fork_namespace_button, name: namespace) click_element(:fork_namespace_button, name: namespace)
end end
def search_for_group(group_name)
find_element(:fork_groups_list_search_field).set(group_name)
end
end end
end end
end end
......
...@@ -76,6 +76,19 @@ module QA ...@@ -76,6 +76,19 @@ module QA
visibility: 'public' visibility: 'public'
} }
end end
def api_put_path
"/groups/#{id}"
end
def update_group_setting(group_setting:, value:)
put_body = { "#{group_setting}": value }
response = put Runtime::API::Request.new(api_client, api_put_path).url, put_body
unless response.code == HTTP_STATUS_OK
raise ResourceUpdateFailedError, "Could not update #{group_setting} to #{value}. Request returned (#{response.code}): `#{response}`."
end
end
end end
end end
end end
# frozen_string_literal: true
module QA
RSpec.describe 'Manage' do
describe 'prevent forking outside group' do
let!(:group_for_fork) do
Resource::Sandbox.fabricate_via_api! do |sandbox_group|
sandbox_group.path = "group_for_fork_#{SecureRandom.hex(8)}"
end
end
let(:project) do
Resource::Project.fabricate! do |project|
project.name = "project_to_fork"
project.initialize_with_readme = true
end
end
context 'when disabled' do
before do
set_prevent_forking_outside_group('disabled')
end
it 'allows forking outside of group', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1070' do
visit_project_and_search_group_for_fork
expect(page).to have_text(group_for_fork.path)
expect(page).to have_text('Select a namespace to fork the project')
end
end
context 'when enabled' do
before do
set_prevent_forking_outside_group('enabled')
end
it 'does not allow forking outside of group', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1107' do
visit_project_and_search_group_for_fork
expect(page).not_to have_text(group_for_fork.path)
expect(page).not_to have_text('Select a namespace to fork the project')
end
end
after do
project.group.sandbox.update_group_setting(group_setting: 'prevent_forking_outside_group', value: false)
project.remove_via_api!
group_for_fork.remove_via_api!
end
def set_prevent_forking_outside_group(enabled_or_disabled)
Flow::Login.sign_in
project.group.sandbox.visit!
Page::Group::Menu.perform(&:click_group_general_settings_item)
Page::Group::Settings::General.perform do |general_setting|
general_setting.send("set_prevent_forking_outside_group_#{enabled_or_disabled}")
end
end
def visit_project_and_search_group_for_fork
project.visit!
Page::Project::Show.perform(&:fork_project)
Page::Project::Fork::New.perform do |fork_new|
fork_new.search_for_group(group_for_fork.path)
end
end
end
end
end
...@@ -25,7 +25,7 @@ module QA ...@@ -25,7 +25,7 @@ module QA
# https://gitlab.com/groups/gitlab-org/-/epics/956 # https://gitlab.com/groups/gitlab-org/-/epics/956
# retry_on_exception added here due to `StaleElementReferenceError`. See: https://gitlab.com/gitlab-org/gitlab/-/issues/232485 # retry_on_exception added here due to `StaleElementReferenceError`. See: https://gitlab.com/gitlab-org/gitlab/-/issues/232485
Support::Retrier.retry_on_exception do Support::Retrier.retry_on_exception do
Capybara.page.has_no_css?('.gl-spinner, .fa-spinner, .spinner', wait: wait) Capybara.page.has_no_css?('.gl-spinner', wait: wait)
end end
end end
end end
......
...@@ -19,7 +19,7 @@ RSpec.describe "User interacts with deploy keys", :js do ...@@ -19,7 +19,7 @@ RSpec.describe "User interacts with deploy keys", :js do
click_button("Enable") click_button("Enable")
expect(page).not_to have_selector(".fa-spinner") expect(page).not_to have_selector(".gl-spinner")
expect(current_path).to eq(project_settings_repository_path(project)) expect(current_path).to eq(project_settings_repository_path(project))
find(".js-deployKeys-tab-enabled_keys").click find(".js-deployKeys-tab-enabled_keys").click
......
<div class="js-create-item-dropdown-fixture-root"> <div class="js-create-item-dropdown-fixture-root">
<input name="variable[environment]" type="hidden"> <input name="variable[environment]" type="hidden" />
<div class="dropdown "><button class="dropdown-menu-toggle js-dropdown-menu-toggle" type="button" data-toggle="dropdown"><span class="dropdown-toggle-text ">some label</span><i aria-hidden="true" data-hidden="true" class="fa fa-chevron-down"></i></button><div class="dropdown-menu dropdown-select dropdown-menu-selectable"><div class="dropdown-input"><input type="search" id="" class="dropdown-input-field" autocomplete="off" /><i aria-hidden="true" data-hidden="true" class="fa fa-search dropdown-input-search"></i><i aria-hidden="true" data-hidden="true" role="button" class="fa fa-times dropdown-input-clear js-dropdown-input-clear"></i></div><div class="dropdown-content js-dropdown-content"></div><div class="dropdown-footer"><ul class="dropdown-footer-list"> <div class="dropdown ">
<li> <button
<button class="dropdown-create-new-item-button js-dropdown-create-new-item"> class="dropdown-menu-toggle js-dropdown-menu-toggle"
Create wildcard type="button"
<code></code> data-toggle="dropdown"
</button> >
</li> <span class="dropdown-toggle-text ">some label</span
</ul> ><i aria-hidden="true" data-hidden="true" class="fa fa-chevron-down"></i>
</div><div class="dropdown-loading"><i aria-hidden="true" data-hidden="true" class="fa fa-spinner fa-spin"></i></div></div></div></div> </button>
<div class="dropdown-menu dropdown-select dropdown-menu-selectable">
<div class="dropdown-input">
<input type="search" id="" class="dropdown-input-field" autocomplete="off" /><i
aria-hidden="true"
data-hidden="true"
class="fa fa-search dropdown-input-search"
></i
><i
aria-hidden="true"
data-hidden="true"
role="button"
class="fa fa-times dropdown-input-clear js-dropdown-input-clear"
></i>
</div>
<div class="dropdown-content js-dropdown-content"></div>
<div class="dropdown-footer">
<ul class="dropdown-footer-list">
<li>
<button class="dropdown-create-new-item-button js-dropdown-create-new-item">
Create wildcard
<code></code>
</button>
</li>
</ul>
</div>
<div class="dropdown-loading">
<span aria-hidden="true" data-hidden="true" class="gl-spinner"></span>
</div>
</div>
</div>
</div>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> </div>
<div class="dropdown-content"></div> <div class="dropdown-content"></div>
<div class="dropdown-loading"> <div class="dropdown-loading">
<i class="fa fa-spinner fa-spin"></i> <span class="gl-spinner"></span>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<ul></ul> <ul></ul>
</li> </li>
<li class="js-builds-dropdown-loading hidden"> <li class="js-builds-dropdown-loading hidden">
<span class="fa fa-spinner"></span> <span class="gl-spinner"></span>
</li> </li>
</ul> </ul>
</div> </div>
<div class="project-item-select-holder"> <div class="project-item-select-holder">
<input class="project-item-select" data-group-id="12345" data-relative-path="issues/new"> <input class="project-item-select" data-group-id="12345" data-relative-path="issues/new" />
<a class="new-project-item-link" data-label="New issue" data-type="issues" href=""> <a class="new-project-item-link" data-label="New issue" data-type="issues" href="">
<i class="fa fa-spinner spin"></i> <span class="gl-spinner"></span>
</a> </a>
<a class="new-project-item-select-button"> <a class="new-project-item-select-button">
<i class="fa fa-caret-down"></i> <i class="fa fa-caret-down"></i>
</a> </a>
</div> </div>
import Vue from 'vue'; import Vue from 'vue';
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import { GlLoadingIcon } from '@gitlab/ui';
import { setHTMLFixture } from 'helpers/fixtures'; import { setHTMLFixture } from 'helpers/fixtures';
import PipelineStore from '~/pipelines/stores/pipeline_store'; import PipelineStore from '~/pipelines/stores/pipeline_store';
import GraphComponentLegacy from '~/pipelines/components/graph/graph_component_legacy.vue'; import GraphComponentLegacy from '~/pipelines/components/graph/graph_component_legacy.vue';
...@@ -42,7 +43,7 @@ describe('graph component', () => { ...@@ -42,7 +43,7 @@ describe('graph component', () => {
}, },
}); });
expect(wrapper.find('.gl-spinner').exists()).toBe(true); expect(wrapper.find(GlLoadingIcon).exists()).toBe(true);
}); });
}); });
...@@ -85,7 +86,7 @@ describe('graph component', () => { ...@@ -85,7 +86,7 @@ describe('graph component', () => {
}); });
it('should not include the loading icon', () => { it('should not include the loading icon', () => {
expect(wrapper.find('.fa-spinner').exists()).toBe(false); expect(wrapper.find(GlLoadingIcon).exists()).toBe(false);
}); });
it('should include the stage column', () => { it('should include the stage column', () => {
......
...@@ -22,7 +22,7 @@ RSpec.describe 'projects/commits/_commit.html.haml' do ...@@ -22,7 +22,7 @@ RSpec.describe 'projects/commits/_commit.html.haml' do
} }
within '.gpg-status-box' do within '.gpg-status-box' do
expect(page).not_to have_css('i.fa.fa-spinner.fa-spin') expect(page).not_to have_css('.gl-spinner')
end end
end end
end end
......
...@@ -3,9 +3,8 @@ ...@@ -3,9 +3,8 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_state do RSpec.describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_state do
subject { described_class.new } let_it_be(:remote_mirror) { create(:remote_mirror) }
let(:remote_mirror) { create(:remote_mirror) }
let(:scheduled_time) { Time.current - 5.minutes } let(:scheduled_time) { Time.current - 5.minutes }
around do |example| around do |example|
...@@ -19,6 +18,8 @@ RSpec.describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_st ...@@ -19,6 +18,8 @@ RSpec.describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_st
end end
describe '#perform' do describe '#perform' do
subject { described_class.new }
it 'calls out to the service to perform the update' do it 'calls out to the service to perform the update' do
expect_mirror_service_to_return(remote_mirror, status: :success) expect_mirror_service_to_return(remote_mirror, status: :success)
...@@ -68,4 +69,8 @@ RSpec.describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_st ...@@ -68,4 +69,8 @@ RSpec.describe RepositoryUpdateRemoteMirrorWorker, :clean_gitlab_redis_shared_st
subject.perform(remote_mirror.id, scheduled_time) subject.perform(remote_mirror.id, scheduled_time)
end end
end end
include_examples 'an idempotent worker' do
let(:job_args) { [remote_mirror.id, scheduled_time] }
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment