mirror of
https://github.com/harness/drone.git
synced 2025-05-10 05:01:41 +08:00
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 table
This commit is contained in:
parent
91c4ccf3b7
commit
154bf4c4b1
@ -22,6 +22,7 @@ import {
|
|||||||
useGetAllRegistriesQuery as _useGetAllRegistriesQuery
|
useGetAllRegistriesQuery as _useGetAllRegistriesQuery
|
||||||
} from '@harnessio/react-har-service-client'
|
} from '@harnessio/react-har-service-client'
|
||||||
import ArTestWrapper from '@ar/utils/testUtils/ArTestWrapper'
|
import ArTestWrapper from '@ar/utils/testUtils/ArTestWrapper'
|
||||||
|
import { testMultiSelectChange } from '@ar/utils/testUtils/utils'
|
||||||
import repositoryFactory from '@ar/frameworks/RepositoryStep/RepositoryFactory'
|
import repositoryFactory from '@ar/frameworks/RepositoryStep/RepositoryFactory'
|
||||||
import { DockerRepositoryType } from '@ar/pages/repository-details/DockerRepository/DockerRepositoryType'
|
import { DockerRepositoryType } from '@ar/pages/repository-details/DockerRepository/DockerRepositoryType'
|
||||||
import { HelmRepositoryType } from '@ar/pages/repository-details/HelmRepository/HelmRepositoryType'
|
import { HelmRepositoryType } from '@ar/pages/repository-details/HelmRepository/HelmRepositoryType'
|
||||||
@ -136,9 +137,7 @@ describe('Test Artifact List Page', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const registriesSelect = getByTestId('regitry-select')
|
const registriesSelect = getByTestId('regitry-select')
|
||||||
await userEvent.click(registriesSelect)
|
await testMultiSelectChange(registriesSelect, 'repo1', '')
|
||||||
const registryIdOption = getByText('repo1')
|
|
||||||
await userEvent.click(registryIdOption)
|
|
||||||
|
|
||||||
expect(useGetAllHarnessArtifactsQuery).toHaveBeenLastCalledWith({
|
expect(useGetAllHarnessArtifactsQuery).toHaveBeenLastCalledWith({
|
||||||
space_ref: 'undefined/+',
|
space_ref: 'undefined/+',
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
div[class*='TableV2--cells'],
|
div[class*='TableV2--cells'],
|
||||||
div[class*='TableV2--header'] {
|
div[class*='TableV2--header'] {
|
||||||
display: grid !important;
|
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,
|
ArtifactNameCell,
|
||||||
LatestArtifactCell
|
LatestArtifactCell
|
||||||
} from './ArtifactListTableCell'
|
} from './ArtifactListTableCell'
|
||||||
|
import { RepositoryNameCell } from '../RegistryArtifactListTable/RegistryArtifactListTableCell'
|
||||||
import css from './ArtifactListTable.module.scss'
|
import css from './ArtifactListTable.module.scss'
|
||||||
|
|
||||||
export interface ArtifactListColumnActions {
|
export interface ArtifactListColumnActions {
|
||||||
@ -78,6 +79,12 @@ export default function ArtifactListTable(props: ArtifactListTableProps): JSX.El
|
|||||||
Cell: ArtifactNameCell,
|
Cell: ArtifactNameCell,
|
||||||
serverSortProps: getServerSortProps('name')
|
serverSortProps: getServerSortProps('name')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Header: getString('artifactList.table.columns.repository'),
|
||||||
|
accessor: 'registryIdentifier',
|
||||||
|
Cell: RepositoryNameCell,
|
||||||
|
serverSortProps: getServerSortProps('registryIdentifier')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Header: getString('artifactList.table.columns.pullCommand'),
|
Header: getString('artifactList.table.columns.pullCommand'),
|
||||||
accessor: 'pullCommand',
|
accessor: 'pullCommand',
|
||||||
|
Loading…
Reference in New Issue
Block a user