mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 15:25:22 +02:00
refactor(ui/button): remove duplicate data-cy
This commit is contained in:
parent
76e49ed9a8
commit
b95bb06535
12 changed files with 4 additions and 14 deletions
|
@ -25,9 +25,8 @@ export function LinkButton({
|
|||
props={{
|
||||
to,
|
||||
params,
|
||||
'data-cy': `${dataCy}-link`,
|
||||
}}
|
||||
data-cy={`${dataCy}-button`}
|
||||
data-cy={dataCy}
|
||||
>
|
||||
{children}
|
||||
</Button>
|
||||
|
|
|
@ -25,10 +25,10 @@ export function AddButton({
|
|||
return (
|
||||
<Button
|
||||
as={Link}
|
||||
props={{ to, params, 'data-cy': `${dataCy}-link` }}
|
||||
props={{ to, params }}
|
||||
icon={Plus}
|
||||
className="!m-0"
|
||||
data-cy={`${dataCy}-button`}
|
||||
data-cy={dataCy}
|
||||
color={color}
|
||||
disabled={disabled}
|
||||
>
|
||||
|
|
|
@ -41,7 +41,7 @@ export interface Props<TasProps = unknown>
|
|||
as?: ComponentType<TasProps> | string;
|
||||
onClick?: MouseEventHandler<HTMLButtonElement>;
|
||||
mRef?: React.ForwardedRef<HTMLButtonElement>;
|
||||
props?: TasProps;
|
||||
props?: Omit<TasProps, keyof Props<TasProps>>;
|
||||
}
|
||||
|
||||
export const ButtonWithRef = forwardRef<HTMLButtonElement, Omit<Props, 'mRef'>>(
|
||||
|
|
|
@ -173,7 +173,6 @@ function ImportExportButtons({
|
|||
disabled={isExportInProgress}
|
||||
props={{
|
||||
to: 'docker.images.import',
|
||||
'data-cy': 'image-importImageLink',
|
||||
}}
|
||||
>
|
||||
Import
|
||||
|
|
|
@ -103,7 +103,6 @@ function Cell({
|
|||
id: item.Id,
|
||||
nodeName: item.NodeName,
|
||||
},
|
||||
'data-cy': `volume-browse-link-${name}`,
|
||||
}}
|
||||
data-cy={`volume-browse-button-${name}`}
|
||||
>
|
||||
|
|
|
@ -37,7 +37,6 @@ function Cell({
|
|||
props={{
|
||||
to: 'kubernetes.resourcePools.resourcePool.access',
|
||||
params: { id: item.Namespace.Name },
|
||||
'data-cy': `manage-access-link-${item.Namespace.Name}`,
|
||||
}}
|
||||
icon={Users}
|
||||
data-cy={`manage-access-button-${item.Namespace.Name}`}
|
||||
|
|
|
@ -31,7 +31,6 @@ function Cell({
|
|||
props={{
|
||||
to: 'portainer.endpoints.endpoint.access',
|
||||
params: { id: environment.Id },
|
||||
'data-cy': `environment-manage-access-${environment.Name}`,
|
||||
}}
|
||||
color="link"
|
||||
icon={Users}
|
||||
|
|
|
@ -26,7 +26,6 @@ function ActionsCell({
|
|||
props={{
|
||||
to: '.group.access',
|
||||
params: { id: item.Id },
|
||||
'data-cy': `manage-access-link_${item.Name}`,
|
||||
}}
|
||||
color="link"
|
||||
icon={Users}
|
||||
|
|
|
@ -57,7 +57,6 @@ export function BrowseButton({
|
|||
props={{
|
||||
to: 'portainer.registries.registry.repositories',
|
||||
params: { id: registry.Id, endpointId: environmentId },
|
||||
'data-cy': `browse-registry-link-${registry.Name}`,
|
||||
}}
|
||||
disabled={isLimited}
|
||||
icon={Search}
|
||||
|
|
|
@ -43,7 +43,6 @@ function Cell({
|
|||
props={{
|
||||
to: '.access',
|
||||
params: { id: item.Id },
|
||||
'data-cy': `manage-access-link-${item.Name}`,
|
||||
}}
|
||||
data-cy={`registry-manage-access-button-${item.Name}`}
|
||||
>
|
||||
|
|
|
@ -46,7 +46,6 @@ export function AppTemplatesListItem({
|
|||
appTemplateId: template.Id,
|
||||
type: duplicateCustomTemplateType,
|
||||
},
|
||||
'data-cy': `app-templates-duplicate-${template.Name}`,
|
||||
}}
|
||||
>
|
||||
Copy as Custom
|
||||
|
|
|
@ -54,7 +54,6 @@ export function CustomTemplatesListItem({
|
|||
params: {
|
||||
id: template.Id,
|
||||
},
|
||||
'data-cy': `custom-templates-edit-link-${template.Id}`,
|
||||
}}
|
||||
icon={Edit}
|
||||
data-cy={`custom-templates-edit-button-${template.Id}`}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue