1
0
Fork 0
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:
Chaim Lev-Ari 2024-02-29 09:26:13 +02:00 committed by GitHub
parent 42c2a52a6b
commit 6c70049ecc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 143 additions and 62 deletions

View file

@ -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"

View file

@ -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[]) {

View file

@ -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">