Commit b31b3f16 authored by peterhegman's avatar peterhegman

Rename `GitLab` variables to `Gitlab`

To better follow Vue naming conventions
parent 5138606b
<script>
import { mapActions } from 'vuex';
import timeAgoTooltip from '../../vue_shared/components/time_ago_tooltip.vue';
import GitLabTeamMemberBadge from '../../vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue';
import GitlabTeamMemberBadge from '../../vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue';
export default {
components: {
timeAgoTooltip,
'gitlab-team-member-badge': GitLabTeamMemberBadge,
GitlabTeamMemberBadge,
},
props: {
author: {
......@@ -50,7 +50,7 @@ export default {
hasAuthor() {
return this.author && Object.keys(this.author).length;
},
showGitLabTeamMemberBadge() {
showGitlabTeamMemberBadge() {
return this.author?.is_gitlab_employee;
},
},
......@@ -91,7 +91,7 @@ export default {
<span v-if="author.status_tooltip_html" v-html="author.status_tooltip_html"></span>
<span class="note-headline-light">@{{ author.username }}</span>
</a>
<gitlab-team-member-badge v-if="showGitLabTeamMemberBadge" />
<gitlab-team-member-badge v-if="showGitlabTeamMemberBadge" />
</template>
<span v-else>{{ __('A deleted user') }}</span>
<span class="note-headline-light note-headline-meta">
......
......@@ -2,26 +2,24 @@
import { GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { __ } from '~/locale';
const GITLAB_TEAM_MEMBER = __('GitLab Team Member');
const GITLAB_TEAM_MEMBER_LABEL = __('GitLab Team Member');
export default {
name: 'GitLabTeamMemberBadge',
name: 'GitlabTeamMemberBadge',
directives: {
GlTooltip: GlTooltipDirective,
},
components: { GlIcon },
created() {
this.GITLAB_TEAM_MEMBER = GITLAB_TEAM_MEMBER;
},
gitlabTeamMemberLabel: GITLAB_TEAM_MEMBER_LABEL,
};
</script>
<template>
<span
v-gl-tooltip.hover
:title="GITLAB_TEAM_MEMBER"
:title="$options.gitlabTeamMemberLabel"
role="img"
:aria-label="GITLAB_TEAM_MEMBER"
:aria-label="$options.gitlabTeamMemberLabel"
class="d-inline-block align-middle"
>
<gl-icon name="tanuki-verified" class="gl-text-purple d-block" />
......
import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import NoteHeader from '~/notes/components/note_header.vue';
import GitLabTeamMemberBadge from '~/vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue';
import GitlabTeamMemberBadge from '~/vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue';
const localVue = createLocalVue();
localVue.use(Vuex);
......@@ -150,7 +150,7 @@ describe('NoteHeader component', () => {
({ props, expected }) => {
createComponent(props);
expect(wrapper.find(GitLabTeamMemberBadge).exists()).toBe(expected);
expect(wrapper.find(GitlabTeamMemberBadge).exists()).toBe(expected);
},
);
});
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