mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
chore(data-cy): require data-cy attributes [EE-6880] (#11453)
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:s390x platform:linux version:]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:ppc64le platform:linux version:]) (push) Waiting to run
ci / build_images (map[arch:s390x platform:linux version:]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
This commit is contained in:
parent
3cad13388c
commit
d38085a560
538 changed files with 2571 additions and 595 deletions
|
@ -61,6 +61,7 @@ export function CommandsTab({
|
|||
value={values.workingDir}
|
||||
onChange={(e) => setFieldValue('workingDir', e.target.value)}
|
||||
placeholder="e.g. /myapp"
|
||||
data-cy="working-dir-input"
|
||||
/>
|
||||
</FormControl>
|
||||
<FormControl
|
||||
|
@ -73,6 +74,7 @@ export function CommandsTab({
|
|||
value={values.user}
|
||||
onChange={(e) => setFieldValue('user', e.target.value)}
|
||||
placeholder="e.g. nginx"
|
||||
data-cy="user-input"
|
||||
/>
|
||||
</FormControl>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,8 @@ import { ReactNode } from 'react';
|
|||
import { mixed } from 'yup';
|
||||
import { ContainerConfig } from 'docker-types/generated/1.41';
|
||||
|
||||
import { AutomationTestingProps } from '@/types';
|
||||
|
||||
import { FormControl } from '@@/form-components/FormControl';
|
||||
|
||||
const consoleSettingTypes = ['tty', 'interactive', 'both', 'none'] as const;
|
||||
|
@ -28,6 +30,7 @@ export function ConsoleSettings({
|
|||
</>
|
||||
}
|
||||
selected={value}
|
||||
data-cy="container-console-interactive-tty"
|
||||
/>
|
||||
<Item
|
||||
value="interactive"
|
||||
|
@ -38,6 +41,7 @@ export function ConsoleSettings({
|
|||
</>
|
||||
}
|
||||
selected={value}
|
||||
data-cy="container-console-interactive"
|
||||
/>
|
||||
<Item
|
||||
value="tty"
|
||||
|
@ -48,12 +52,14 @@ export function ConsoleSettings({
|
|||
</>
|
||||
}
|
||||
selected={value}
|
||||
data-cy="container-console-tty"
|
||||
/>
|
||||
<Item
|
||||
value="none"
|
||||
onChange={handleChange}
|
||||
label={<>None</>}
|
||||
selected={value}
|
||||
data-cy="container-console-none"
|
||||
/>
|
||||
</FormControl>
|
||||
);
|
||||
|
@ -68,16 +74,18 @@ function Item({
|
|||
selected,
|
||||
onChange,
|
||||
label,
|
||||
'data-cy': dataCy,
|
||||
}: {
|
||||
value: ConsoleSetting;
|
||||
selected: ConsoleSetting;
|
||||
onChange(value: ConsoleSetting): void;
|
||||
label: ReactNode;
|
||||
}) {
|
||||
} & AutomationTestingProps) {
|
||||
return (
|
||||
<label className="radio-inline !m-0 w-1/2">
|
||||
<input
|
||||
type="radio"
|
||||
data-cy={dataCy}
|
||||
name="container_console"
|
||||
value={value}
|
||||
checked={value === selected}
|
||||
|
|
|
@ -52,6 +52,7 @@ export function LoggerConfig({
|
|||
value={value.type}
|
||||
onChange={(type) => onChange({ ...value, type: type || '' })}
|
||||
options={pluginOptions}
|
||||
data-cy="docker-logging-driver-selector"
|
||||
/>
|
||||
</FormControl>
|
||||
|
||||
|
@ -82,6 +83,7 @@ export function LoggerConfig({
|
|||
itemBuilder={() => ({ option: '', value: '' })}
|
||||
disabled={isDisabled}
|
||||
errors={errors?.options}
|
||||
data-cy="docker-logging-options"
|
||||
/>
|
||||
</FormSection>
|
||||
);
|
||||
|
@ -95,6 +97,7 @@ function Item({
|
|||
item: { option, value },
|
||||
onChange,
|
||||
error,
|
||||
index,
|
||||
}: ItemProps<{ option: string; value: string }>) {
|
||||
return (
|
||||
<div>
|
||||
|
@ -105,6 +108,7 @@ function Item({
|
|||
value={option}
|
||||
onChange={(e) => handleChange({ option: e.target.value })}
|
||||
placeholder="e.g. FOO"
|
||||
data-cy={`docker-logging-option_${index}`}
|
||||
/>
|
||||
</InputGroup>
|
||||
<InputGroup className="w-1/2">
|
||||
|
@ -113,6 +117,7 @@ function Item({
|
|||
value={value}
|
||||
onChange={(e) => handleChange({ value: e.target.value })}
|
||||
placeholder="e.g bar"
|
||||
data-cy={`docker-logging-value_${index}`}
|
||||
/>
|
||||
</InputGroup>
|
||||
</div>
|
||||
|
|
|
@ -21,6 +21,7 @@ export function OverridableInput({
|
|||
<InputGroup.ButtonWrapper>
|
||||
<Button
|
||||
color="light"
|
||||
data-cy={`docker-container-default-${id}`}
|
||||
size="medium"
|
||||
className={clsx('!ml-0', { active: !override })}
|
||||
onClick={() => onChange(null)}
|
||||
|
@ -29,6 +30,7 @@ export function OverridableInput({
|
|||
</Button>
|
||||
<Button
|
||||
color="light"
|
||||
data-cy={`docker-container-override-${id}`}
|
||||
size="medium"
|
||||
className={clsx({ active: override })}
|
||||
onClick={() => onChange('')}
|
||||
|
@ -38,6 +40,7 @@ export function OverridableInput({
|
|||
</InputGroup.ButtonWrapper>
|
||||
<InputGroup.Input
|
||||
disabled={!override}
|
||||
data-cy={`docker-container-input-${id}`}
|
||||
value={value || ''}
|
||||
onChange={(e) => onChange(e.target.value)}
|
||||
id={id}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue