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