Commit e0442862 authored by Jacques Erasmus's avatar Jacques Erasmus Committed by Kushal Pandya

Add external link icon

Added an external link icon
parent f7f91373
<script> <script>
import { GlDropdown, GlDropdownItem } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem, GlIcon } from '@gitlab/ui';
import Icon from '~/vue_shared/components/icon.vue';
import { s__ } from '../../locale'; import { s__ } from '../../locale';
export default { export default {
...@@ -8,7 +7,7 @@ export default { ...@@ -8,7 +7,7 @@ export default {
components: { components: {
GlDropdown, GlDropdown,
GlDropdownItem, GlDropdownItem,
Icon, GlIcon,
}, },
props: { props: {
stacks: { stacks: {
...@@ -86,8 +85,9 @@ export default { ...@@ -86,8 +85,9 @@ export default {
href="https://crossplane.io/docs/master/stacks-guide.html" href="https://crossplane.io/docs/master/stacks-guide.html"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
>{{ __('Crossplane') }}</a >{{ __('Crossplane') }}
> <gl-icon name="external-link" class="vertical-align-middle" />
</a>
</p> </p>
</div> </div>
</template> </template>
---
title: Add missing external-link icon for Crossplane managed app
merge_request: 20283
author:
type: fixed
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDropdownItem } from '@gitlab/ui'; import { GlDropdownItem, GlIcon } from '@gitlab/ui';
import CrossplaneProviderStack from '~/clusters/components/crossplane_provider_stack.vue'; import CrossplaneProviderStack from '~/clusters/components/crossplane_provider_stack.vue';
describe('CrossplaneProviderStack component', () => { describe('CrossplaneProviderStack component', () => {
...@@ -72,7 +72,12 @@ describe('CrossplaneProviderStack component', () => { ...@@ -72,7 +72,12 @@ describe('CrossplaneProviderStack component', () => {
findFirstDropdownElement().vm.$emit('click'); findFirstDropdownElement().vm.$emit('click');
expect(wrapper.emitted().set[0][0].code).toEqual('gcp'); expect(wrapper.emitted().set[0][0].code).toEqual('gcp');
}); });
it('it renders the correct dropdown text when no stack is selected', () => {
it('renders the correct dropdown text when no stack is selected', () => {
expect(wrapper.vm.dropdownText).toBe('Select Stack'); expect(wrapper.vm.dropdownText).toBe('Select Stack');
}); });
it('renders an external link', () => {
expect(wrapper.find(GlIcon).props('name')).toBe('external-link');
});
}); });
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