1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59: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

This commit is contained in:
Ali 2024-04-11 12:11:38 +12:00 committed by GitHub
parent 3cad13388c
commit d38085a560
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
538 changed files with 2571 additions and 595 deletions

View file

@ -21,12 +21,14 @@ export function IntegratedAppsDatatable({
isLoading,
tableKey,
tableTitle,
dataCy,
}: {
dataset: Array<IntegratedApp>;
onRefresh: () => void;
isLoading: boolean;
tableKey: string;
tableTitle: string;
dataCy: string;
}) {
const tableState = useTableStateWithStorage<TableSettings>(
tableKey,
@ -54,6 +56,7 @@ export function IntegratedAppsDatatable({
/>
</TableSettingsMenu>
)}
data-cy={dataCy}
/>
);
}

View file

@ -15,6 +15,7 @@ function Cell({ row: { original: item } }: CellContext<IntegratedApp, string>) {
<Link
to="kubernetes.applications.application"
params={{ name: item.Name, namespace: item.ResourcePool }}
data-cy={`application-link-${item.Name}`}
>
{item.Name}
</Link>

View file

@ -3,6 +3,7 @@ import YAML from 'yaml';
import { Minus, Plus } from 'lucide-react';
import { FeatureId } from '@/react/portainer/feature-flags/enums';
import { AutomationTestingProps } from '@/types';
import { WebEditorForm } from '@@/WebEditorForm';
import { Button } from '@@/buttons';
@ -12,15 +13,21 @@ type Props = {
identifier: string;
data: string;
hideMessage?: boolean;
};
} & AutomationTestingProps;
export function YAMLInspector({ identifier, data, hideMessage }: Props) {
export function YAMLInspector({
identifier,
data,
hideMessage,
'data-cy': dataCy,
}: Props) {
const [expanded, setExpanded] = useState(false);
const yaml = useMemo(() => cleanYamlUnwantedFields(data), [data]);
return (
<div>
<WebEditorForm
data-cy={dataCy}
value={yaml}
placeholder={
hideMessage
@ -37,6 +44,7 @@ export function YAMLInspector({ identifier, data, hideMessage }: Props) {
<div className="flex items-center justify-between py-5">
<Button
icon={expanded ? Minus : Plus}
data-cy={`expand-collapse-yaml-${identifier}`}
color="default"
className="!ml-0"
onClick={() => setExpanded(!expanded)}
@ -48,6 +56,7 @@ export function YAMLInspector({ identifier, data, hideMessage }: Props) {
heading="Apply YAML changes"
message="Applies any changes that you make in the YAML editor by calling the Kubernetes API to patch the relevant resources. Any resource removals or unexpected resource additions that you make in the YAML will be ignored. Note that editing is disabled for resources in namespaces marked as system."
buttonText="Apply changes"
data-cy="yaml-inspector-apply-changes-teaser-button"
/>
</div>
</div>