Commit 29ce41dc authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch...

Merge branch '219798-matej-new-replace-gl-deprecated-button-with-gl-button-in-ee-app-assets-javascripts-boards-components' into 'master'

Replace the weight select deprecated button

Closes #219798

See merge request gitlab-org/gitlab!39443
parents fa5b37ec 26630149
<script> <script>
import { GlDeprecatedButton, GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui'; import { GlButton, GlDeprecatedDropdown, GlDeprecatedDropdownItem } from '@gitlab/ui';
const ANY_WEIGHT = 'Any weight'; const ANY_WEIGHT = 'Any weight';
const NO_WEIGHT = 'None'; const NO_WEIGHT = 'None';
export default { export default {
components: { components: {
GlDeprecatedButton, GlButton,
GlDeprecatedDropdown, GlDeprecatedDropdown,
GlDeprecatedDropdownItem, GlDeprecatedDropdownItem,
}, },
...@@ -71,14 +71,9 @@ export default { ...@@ -71,14 +71,9 @@ export default {
<div class="block weight"> <div class="block weight">
<div class="title gl-mb-3"> <div class="title gl-mb-3">
{{ __('Weight') }} {{ __('Weight') }}
<gl-deprecated-button <gl-button v-if="canEdit" variant="link" class="float-right" @click="showDropdown">
v-if="canEdit"
variant="blank"
class="float-right"
@click="showDropdown"
>
{{ __('Edit') }} {{ __('Edit') }}
</gl-deprecated-button> </gl-button>
</div> </div>
<div :class="valueClass" :hidden="!dropdownHidden" class="value">{{ valueText }}</div> <div :class="valueClass" :hidden="!dropdownHidden" class="value">{{ valueText }}</div>
......
import { mount } from '@vue/test-utils'; import { mount } from '@vue/test-utils';
import WeightSelect from 'ee/boards/components/weight_select.vue'; import WeightSelect from 'ee/boards/components/weight_select.vue';
import { GlDeprecatedButton, GlDeprecatedDropdown } from '@gitlab/ui'; import { GlButton, GlDeprecatedDropdown } from '@gitlab/ui';
describe('WeightSelect', () => { describe('WeightSelect', () => {
let wrapper; let wrapper;
const editButton = () => wrapper.find(GlDeprecatedButton); const editButton = () => wrapper.find(GlButton);
const valueContainer = () => wrapper.find('.value'); const valueContainer = () => wrapper.find('.value');
const weightDropdown = () => wrapper.find(GlDeprecatedDropdown); const weightDropdown = () => wrapper.find(GlDeprecatedDropdown);
const weightSelect = () => wrapper.find({ ref: 'weight-select' }); const weightSelect = () => wrapper.find({ ref: 'weight-select' });
......
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