Skip to content
Snippets Groups Projects
Unverified Commit 54fa8d4a authored by peterhegman's avatar peterhegman
Browse files

Apply frontend maintainer suggestions

parent a9fdd02c
No related merge requests found
<script>
import { GlFormText, GlIcon, GlLink, GlFormGroup, GlFormCheckbox } from '@gitlab/ui';
import { GlIcon, GlLink, GlFormGroup, GlFormCheckbox } from '@gitlab/ui';
import IntegrationHelpText from '~/vue_shared/components/integrations_help_text.vue';
export default {
name: 'IntegrationView',
components: {
GlFormText,
GlIcon,
GlLink,
GlFormGroup,
......@@ -62,11 +61,11 @@ export default {
value="0"
data-testid="profile-preferences-integration-hidden-field"
/>
<gl-form-checkbox :id="formId" :checked="isEnabled" :name="formName" value="1">{{
config.label
}}</gl-form-checkbox>
<gl-form-text tag="div">
<integration-help-text :message="message" :message-url="messageUrl" />
</gl-form-text>
<gl-form-checkbox :id="formId" :checked="isEnabled" :name="formName" value="1"
>{{ config.label }}
<template #help>
<integration-help-text :message="message" :message-url="messageUrl" />
</template>
</gl-form-checkbox>
</gl-form-group>
</template>
import { GlFormGroup, GlFormText } from '@gitlab/ui';
import { GlFormGroup } from '@gitlab/ui';
import { mountExtended } from 'helpers/vue_test_utils_helper';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
......@@ -33,10 +33,10 @@ describe('IntegrationView component', () => {
});
}
const findCheckbox = () => wrapper.findByLabelText(defaultProps.config.label);
const findCheckbox = () => wrapper.findByLabelText(new RegExp(defaultProps.config.label));
const findFormGroup = () => wrapper.findComponent(GlFormGroup);
const findHiddenField = () =>
wrapper.find('[data-testid="profile-preferences-integration-hidden-field"]');
wrapper.findByTestId('profile-preferences-integration-hidden-field');
afterEach(() => {
wrapper.destroy();
......@@ -98,7 +98,6 @@ describe('IntegrationView component', () => {
it('should render the help text', () => {
wrapper = createComponent();
expect(wrapper.find(GlFormText).exists()).toBe(true);
expect(wrapper.find(IntegrationHelpText).exists()).toBe(true);
});
});
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