mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 23:35:31 +02:00
feat(kube): add a11y props for smoke tests [EE-6747] (#11263)
This commit is contained in:
parent
42c2a52a6b
commit
6c70049ecc
26 changed files with 143 additions and 62 deletions
|
@ -43,7 +43,7 @@ export function AccessControlForm({
|
|||
<div className="form-group">
|
||||
<div className="col-sm-12">
|
||||
<SwitchField
|
||||
dataCy="portainer-accessMgmtToggle"
|
||||
data-cy="portainer-accessMgmtToggle"
|
||||
checked={accessControlEnabled}
|
||||
name={withNamespace('accessControlEnabled')}
|
||||
label="Enable access control"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { useRouter } from '@uirouter/react';
|
||||
import { Plus, Trash2 } from 'lucide-react';
|
||||
import { Trash2 } from 'lucide-react';
|
||||
|
||||
import { pluralize } from '@/portainer/helpers/strings';
|
||||
|
||||
import { confirmDestructive } from '@@/modals/confirm';
|
||||
import { Button } from '@@/buttons';
|
||||
import { AddButton, Button } from '@@/buttons';
|
||||
|
||||
import { HelmRepository } from './types';
|
||||
import { useDeleteHelmRepositoriesMutation } from './helm-repositories.service';
|
||||
|
@ -18,7 +18,7 @@ export function HelmRepositoryDatatableActions({ selectedItems }: Props) {
|
|||
const deleteHelmRepoMutation = useDeleteHelmRepositoriesMutation();
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex gap-2">
|
||||
<Button
|
||||
disabled={selectedItems.length < 1}
|
||||
color="dangerlight"
|
||||
|
@ -29,16 +29,10 @@ export function HelmRepositoryDatatableActions({ selectedItems }: Props) {
|
|||
Remove
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
onClick={() =>
|
||||
router.stateService.go('portainer.account.createHelmRepository')
|
||||
}
|
||||
data-cy="credentials-addButton"
|
||||
icon={Plus}
|
||||
>
|
||||
<AddButton to="portainer.account.createHelmRepository">
|
||||
Add Helm repository
|
||||
</Button>
|
||||
</>
|
||||
</AddButton>
|
||||
</div>
|
||||
);
|
||||
|
||||
async function onDeleteClick(selectedItems: HelmRepository[]) {
|
||||
|
|
|
@ -39,13 +39,18 @@ export function HelmRepositoryForm({
|
|||
>
|
||||
{({ values, errors, handleSubmit, isValid, dirty }) => (
|
||||
<Form className="form-horizontal" onSubmit={handleSubmit} noValidate>
|
||||
<FormControl inputId="url" label="URL" errors={errors.URL} required>
|
||||
<FormControl
|
||||
inputId="url-field"
|
||||
label="URL"
|
||||
errors={errors.URL}
|
||||
required
|
||||
>
|
||||
<Field
|
||||
as={Input}
|
||||
name="URL"
|
||||
value={values.URL}
|
||||
autoComplete="off"
|
||||
id="URL"
|
||||
id="url-field"
|
||||
/>
|
||||
</FormControl>
|
||||
<div className="form-group">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue