mirror of https://github.com/harness/drone.git
feat: [AH-979]: Add Registry column in global artifact list table (#3585)
* feat: [AH-979]: fix failing unit tests * feat: [AH-979]: Add Registry column in global artifact list tablemain
parent
91c4ccf3b7
commit
154bf4c4b1
|
@ -22,6 +22,7 @@ import {
|
|||
useGetAllRegistriesQuery as _useGetAllRegistriesQuery
|
||||
} from '@harnessio/react-har-service-client'
|
||||
import ArTestWrapper from '@ar/utils/testUtils/ArTestWrapper'
|
||||
import { testMultiSelectChange } from '@ar/utils/testUtils/utils'
|
||||
import repositoryFactory from '@ar/frameworks/RepositoryStep/RepositoryFactory'
|
||||
import { DockerRepositoryType } from '@ar/pages/repository-details/DockerRepository/DockerRepositoryType'
|
||||
import { HelmRepositoryType } from '@ar/pages/repository-details/HelmRepository/HelmRepositoryType'
|
||||
|
@ -136,9 +137,7 @@ describe('Test Artifact List Page', () => {
|
|||
})
|
||||
|
||||
const registriesSelect = getByTestId('regitry-select')
|
||||
await userEvent.click(registriesSelect)
|
||||
const registryIdOption = getByText('repo1')
|
||||
await userEvent.click(registryIdOption)
|
||||
await testMultiSelectChange(registriesSelect, 'repo1', '')
|
||||
|
||||
expect(useGetAllHarnessArtifactsQuery).toHaveBeenLastCalledWith({
|
||||
space_ref: 'undefined/+',
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
div[class*='TableV2--cells'],
|
||||
div[class*='TableV2--header'] {
|
||||
display: grid !important;
|
||||
grid-template-columns: minmax(var(--har-table-name-column-min-width), 1fr) 10rem 10rem 15rem 15rem 15rem;
|
||||
grid-template-columns: minmax(var(--har-table-name-column-min-width), 1fr) 12rem 10rem 8rem 12rem 12rem 8rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ import {
|
|||
ArtifactNameCell,
|
||||
LatestArtifactCell
|
||||
} from './ArtifactListTableCell'
|
||||
import { RepositoryNameCell } from '../RegistryArtifactListTable/RegistryArtifactListTableCell'
|
||||
import css from './ArtifactListTable.module.scss'
|
||||
|
||||
export interface ArtifactListColumnActions {
|
||||
|
@ -78,6 +79,12 @@ export default function ArtifactListTable(props: ArtifactListTableProps): JSX.El
|
|||
Cell: ArtifactNameCell,
|
||||
serverSortProps: getServerSortProps('name')
|
||||
},
|
||||
{
|
||||
Header: getString('artifactList.table.columns.repository'),
|
||||
accessor: 'registryIdentifier',
|
||||
Cell: RepositoryNameCell,
|
||||
serverSortProps: getServerSortProps('registryIdentifier')
|
||||
},
|
||||
{
|
||||
Header: getString('artifactList.table.columns.pullCommand'),
|
||||
accessor: 'pullCommand',
|
||||
|
|
Loading…
Reference in New Issue