Commit bf5163da authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'mfluharty-blob-viewer-button-group' into 'master'

Make blob viewer lock button group smoothly with other buttons

See merge request gitlab-org/gitlab!81851
parents 9fb971c2 9cafd899
...@@ -90,11 +90,8 @@ export default { ...@@ -90,11 +90,8 @@ export default {
</script> </script>
<template> <template>
<span> <gl-button :disabled="!canLock" :loading="lockLoading" @click="showModal">
<gl-button :disabled="!canLock" :loading="lockLoading" @click="showModal"> {{ lockButtonTitle }}
{{ lockButtonTitle }}
</gl-button>
<gl-modal <gl-modal
modal-id="lock-file-modal" modal-id="lock-file-modal"
:visible="isModalVisible" :visible="isModalVisible"
...@@ -108,5 +105,5 @@ export default { ...@@ -108,5 +105,5 @@ export default {
{{ lockConfirmText }} {{ lockConfirmText }}
</p> </p>
</gl-modal> </gl-modal>
</span> </gl-button>
</template> </template>
...@@ -59,10 +59,10 @@ describe('LockButton component', () => { ...@@ -59,10 +59,10 @@ describe('LockButton component', () => {
isLocked | label isLocked | label
${false} | ${'Lock'} ${false} | ${'Lock'}
${true} | ${'Unlock'} ${true} | ${'Unlock'}
`('renders the correct button labels', ({ isLocked, label }) => { `('renders the $label button label', ({ isLocked, label }) => {
createComponent({ isLocked }); createComponent({ isLocked });
expect(findLockButton().text()).toBe(label); expect(findLockButton().text()).toContain(label);
}); });
it('passes the correct prop if lockLoading is set to true', async () => { it('passes the correct prop if lockLoading is set to true', async () => {
......
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