1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

chore(automation): give unique selectors [r8s-168] (#345)

Co-authored-by: JamesPlayer <james.player@portainer.io>
This commit is contained in:
Ali 2025-01-30 15:42:32 +13:00 committed by GitHub
parent b30a1b5250
commit c80cc6e268
29 changed files with 38 additions and 4 deletions

View file

@ -122,6 +122,7 @@ export function AppIngressPathForm({
onChangeIngressPath(newIngressPath);
}}
data-cy="k8sAppCreate-ingressPathHostSelect"
id="k8sAppCreate-ingressPathHostSelect"
/>
<InputGroup.ButtonWrapper>
<Button

View file

@ -60,6 +60,7 @@ export function ConfigurationItem({
onChange={onSelectConfigMap}
size="sm"
data-cy={`k8sAppCreate-add${configurationType}Select_${index}`}
id={`k8sAppCreate-add${configurationType}Select_${index}`}
/>
</InputGroup>
{formikError?.selectedConfiguration && (

View file

@ -144,6 +144,7 @@ export function PersistedFolderItem({
applicationValues.Containers.length > 1
}
data-cy={`k8sAppCreate-persistentFolderSizeUnitSelect_${index}`}
id={`k8sAppCreate-persistentFolderSizeUnitSelect_${index}`}
/>
</InputGroup>
{formikError?.size && <FormError>{formikError?.size}</FormError>}
@ -175,6 +176,7 @@ export function PersistedFolderItem({
storageClasses.length <= 1
}
data-cy={`k8sAppCreate-storageSelect_${index}`}
id={`k8sAppCreate-storageSelect_${index}`}
/>
</InputGroup>
</>
@ -207,6 +209,7 @@ export function PersistedFolderItem({
availableVolumes.length < 1
}
data-cy={`k8sAppCreate-pvcSelect_${index}`}
id={`k8sAppCreate-pvcSelect_${index}`}
/>
</InputGroup>
)}

View file

@ -49,6 +49,7 @@ export function PlacementItem({
className={clsx({ striked: !!item.needsDeletion })}
isDisabled={!!item.needsDeletion}
data-cy={`k8sAppCreate-placementLabel_${index}`}
id={`k8sAppCreate-placementLabel_${index}`}
/>
{placementError?.label && (
<FormError>{placementError.label}</FormError>
@ -65,6 +66,7 @@ export function PlacementItem({
className={clsx({ striked: !!item.needsDeletion })}
isDisabled={!!item.needsDeletion}
data-cy={`k8sAppCreate-placementName_${index}`}
id={`k8sAppCreate-placementName_${index}`}
/>
{placementError?.value && (
<FormError>{placementError.value}</FormError>

View file

@ -35,6 +35,7 @@ export function StorageAccessModeSelector({
inputId={inputId}
placeholder="Not configured"
data-cy={`kubeSetup-storageAccessSelect${storageClassName}`}
id={`kubeSetup-storageAccessSelect${storageClassName}`}
/>
);
}

View file

@ -43,6 +43,7 @@ export function NamespacesSelector({
onChange(selectedTeams.map((namespace) => namespace.name))
}
data-cy={dataCy}
id={dataCy}
inputId={inputId}
placeholder={placeholder}
/>

View file

@ -184,6 +184,7 @@ export function IngressForm({
}
noOptionsMessage={() => 'No namespaces available'}
data-cy="k8sAppCreate-namespaceSelect"
id="k8sAppCreate-namespaceSelect"
/>
)}
</div>
@ -266,6 +267,7 @@ export function IngressForm({
}
noOptionsMessage={() => 'No ingress classes available'}
data-cy="k8sAppCreate-ingressClassSelect"
id="k8sAppCreate-ingressClassSelect"
/>
{errors.className && (
<FormError className="error-inline mt-1">
@ -464,6 +466,7 @@ export function IngressForm({
noOptionsMessage={() => 'No TLS secrets available'}
size="sm"
data-cy={`k8sAppCreate-tlsSelect_${hostIndex}`}
id={`k8sAppCreate-tlsSelect_${hostIndex}`}
/>
{!host.NoHost && (
<div className="input-group-btn">

View file

@ -35,6 +35,7 @@ export function NamespaceAccessUsersSelector({
closeMenuOnSelect={false}
onChange={onChange}
data-cy={dataCy}
id={dataCy}
inputId={inputId}
placeholder={placeholder}
components={{ MultiValueLabel, Option: OptionComponent }}

View file

@ -67,6 +67,7 @@ export function RegistriesSelector({
onChange={onChange}
inputId={inputId}
data-cy="namespaceCreate-registrySelect"
id="namespaceCreate-registrySelect"
placeholder="Select one or more registries"
isDisabled={isEditingDisabled}
/>