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

Merge branch 'eread/use-text-links-in-mr-approval-settings-ui' into 'master'

Use text links in MR approval settings section of UI

See merge request gitlab-org/gitlab!67737
parents deeceeea 7ecc2da2
......@@ -51,7 +51,7 @@ export default {
},
},
i18n: {
helpLabel: __('Help'),
helpLinkText: __('Learn more.'),
lockIconTitle: __('Setting enforced'),
},
};
......@@ -72,12 +72,7 @@ export default {
/>
</template>
<gl-link :href="href" target="_blank">
<gl-icon
data-testid="help-icon"
name="question-o"
:aria-label="$options.i18n.helpLabel"
:size="16"
/>
{{ $options.i18n.helpLinkText }}
</gl-link>
</gl-form-checkbox>
</template>
......@@ -33,7 +33,6 @@ describe('ApprovalSettingsCheckbox', () => {
const findLink = () => wrapper.findComponent(GlLink);
const findPopover = () => wrapper.findComponent(GlPopover);
const findLockIcon = () => wrapper.findByTestId('lock-icon');
const findHelpIcon = () => wrapper.findByTestId('help-icon');
afterEach(() => {
wrapper.destroy();
......@@ -45,15 +44,15 @@ describe('ApprovalSettingsCheckbox', () => {
});
it('shows the label', () => {
expect(findCheckbox().text()).toBe(label);
expect(findCheckbox().text()).toContain(label);
});
it('sets the correct help link', () => {
expect(findLink().attributes('href')).toBe(`/help/${APPROVALS_HELP_PATH}#${anchor}`);
it('shows the help text', () => {
expect(findCheckbox().text()).toContain('Learn more.');
});
it('shows a help icon', () => {
expect(findHelpIcon().props('name')).toBe('question-o');
it('sets the correct help link', () => {
expect(findLink().attributes('href')).toBe(`/help/${APPROVALS_HELP_PATH}#${anchor}`);
});
});
......
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