Commit 27736c38 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'mw-replace-fa-chevron-down-dropdown-button' into 'master'

Replace fa-chevron-down in dropdown button

See merge request gitlab-org/gitlab!47758
parents be30259f f7ac8479
<script>
import { GlLoadingIcon } from '@gitlab/ui';
import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
export default {
components: {
GlLoadingIcon,
GlIcon,
},
props: {
isDisabled: {
......@@ -39,8 +40,10 @@ export default {
<slot v-if="$slots.default"></slot>
<span v-else class="dropdown-toggle-text"> {{ toggleText }} </span>
</template>
<span v-show="!isLoading" class="dropdown-toggle-icon">
<i class="fa fa-chevron-down" aria-hidden="true" data-hidden="true"></i>
</span>
<gl-icon
v-show="!isLoading"
class="gl-absolute gl-top-3 gl-right-3 gl-text-gray-500"
name="chevron-down"
/>
</button>
</template>
---
title: Replace fa-chevron-down in dropdown button
merge_request: 47758
author:
type: changed
......@@ -60,10 +60,9 @@ describe('DropdownButtonComponent', () => {
});
it('renders dropdown button icon', () => {
const dropdownIconEl = vm.$el.querySelector('.dropdown-toggle-icon i.fa');
const dropdownIconEl = vm.$el.querySelector('[data-testid="chevron-down-icon"]');
expect(dropdownIconEl).not.toBeNull();
expect(dropdownIconEl.classList.contains('fa-chevron-down')).toBe(true);
});
it('renders slot, if default slot exists', () => {
......
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