Commit 4301dcc3 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'vs-backport-fixes-for-jest-twenty-six' into 'master'

Backport spec fixes for upcoming upgrade to Jest 26

See merge request gitlab-org/gitlab!39090
parents 228955f1 be71ec68
......@@ -45,7 +45,7 @@ export default {
<gl-skeleton-loading v-if="isLoading" class="gl-h-auto gl-py-3" />
<div v-else ref="metricsWrapper" class="gl-display-flex">
<div
v-for="{ tooltipText = '', ...metric } in metrics"
v-for="metric in metrics"
:key="metric.key"
ref="metricItem"
class="js-metric-card-item gl-flex-grow-1 gl-text-center"
......@@ -56,14 +56,16 @@ export default {
<h3 v-else class="gl-my-2">{{ valueText(metric) }}</h3>
<p class="text-secondary gl-font-sm gl-mb-2">
{{ metric.label }}
<span v-if="tooltipText.length"
>&nbsp;<gl-icon
v-gl-tooltip="{ title: tooltipText }"
<span v-if="metric.tooltipText">
&nbsp;
<gl-icon
v-gl-tooltip="{ title: metric.tooltipText }"
:size="14"
class="gl-vertical-align-middle"
name="question"
data-testid="tooltip"
/></span>
/>
</span>
</p>
</div>
</div>
......
......@@ -72,7 +72,7 @@ describe('Vulnerability state dropdown component', () => {
});
describe('tests that use the default wrapper', () => {
beforeEach(createWrapper);
beforeEach(() => createWrapper());
it('the save button should be enabled/disabled based on if the selected item has changed or not', () => {
const originalItem = selectedItem();
......
......@@ -13,7 +13,7 @@ import {
SET_TAGS_LIST_SUCCESS,
SET_TAGS_PAGINATION,
SET_INITIAL_STATE,
} from '~/registry/explorer/stores/mutation_types/';
} from '~/registry/explorer/stores/mutation_types';
import { tagsListResponse } from '../mock_data';
import { DeleteModal } from '../stubs';
......
......@@ -14,7 +14,7 @@ import {
SET_IMAGES_LIST_SUCCESS,
SET_PAGINATION,
SET_INITIAL_STATE,
} from '~/registry/explorer/stores/mutation_types/';
} from '~/registry/explorer/stores/mutation_types';
import {
DELETE_IMAGE_SUCCESS_MESSAGE,
DELETE_IMAGE_ERROR_MESSAGE,
......
......@@ -25,7 +25,7 @@ describe('Identicon', () => {
});
describe('entity id is a number', () => {
beforeEach(createComponent);
beforeEach(() => createComponent());
it('matches snapshot', () => {
expect(wrapper.element).toMatchSnapshot();
......
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