Commit 6b66a1e3 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch...

Merge branch '330396-package-registry-pypi-packages-file-list-vanishes-when-different-credentials-publish-to-the' into 'master'

Hide commit msg for package files without pipeline

See merge request gitlab-org/gitlab!61571
parents 47a108cb 12a33df9
......@@ -92,6 +92,7 @@ export default {
<template #cell(commit)="{ item }">
<gl-link
v-if="item.pipeline && item.pipeline.project"
:href="item.pipeline.project.commit_url"
class="gl-text-gray-500"
data-testid="commit-link"
......
---
title: Hide commit msg for package files without pipeline
merge_request: 61571
author:
type: fixed
......@@ -11,8 +11,10 @@ describe('Package Files', () => {
const findAllRows = () => wrapper.findAll('[data-testid="file-row"');
const findFirstRow = () => findAllRows().at(0);
const findSecondRow = () => findAllRows().at(1);
const findFirstRowDownloadLink = () => findFirstRow().find('[data-testid="download-link"');
const findFirstRowCommitLink = () => findFirstRow().find('[data-testid="commit-link"');
const findSecondRowCommitLink = () => findSecondRow().find('[data-testid="commit-link"');
const findFirstRowFileIcon = () => findFirstRow().find(FileIcon);
const findFirstRowCreatedAt = () => findFirstRow().find(TimeAgoTooltip);
......@@ -126,5 +128,14 @@ describe('Package Files', () => {
expect(findFirstRowCommitLink().exists()).toBe(false);
});
});
describe('when only one file lacks an associated pipeline', () => {
it('renders the commit when it exists and not otherwise', () => {
createComponent([npmFiles[0], mavenFiles[0]]);
expect(findFirstRowCommitLink().exists()).toBe(true);
expect(findSecondRowCommitLink().exists()).toBe(false);
});
});
});
});
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