Commit 03d3f3b7 authored by Sam White's avatar Sam White Committed by Alexander Turinske

Fix for approval check popover bug

- when multiple `ApprovalCheckPopover` components exists,
  the popovers do not attach to the correct icon
- add title to `id` to make the id unique

Changelog: fixed
EE: true
parent 4b04c92a
......@@ -35,14 +35,14 @@ export default {
<template>
<span class="vertical-align-middle text-muted js-help ml-2">
<gl-icon
id="reportInfo"
:id="'reportInfo' + title"
name="question"
class="author-link suggestion-help-hover"
:aria-label="__('help')"
:size="14"
data-testid="icon2"
/>
<gl-popover target="reportInfo" placement="top" :title="title">
<gl-popover :target="'reportInfo' + title" placement="top" :title="title">
<div class="mb-2">{{ text }}</div>
<gl-link v-if="documentationLink" target="_blank" :href="documentationLink">
<span class="vertical-align-middle">{{ documentationText }}</span>
......
......@@ -60,7 +60,7 @@ describe('Approval Check Popover', () => {
});
describe('approvalConfig', () => {
it('returns "Vulberability-Check" config', (done) => {
it('returns "Vulnerability-Check" config', (done) => {
wrapper.setProps({ rule: { name: VULNERABILITY_CHECK_NAME } });
Vue.nextTick(() => {
expect(wrapper.vm.approvalRuleConfig.title).toBe(
......
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