import * as React from 'react'; import { FormSection, Content, ContentVariants, ValidatedOptions } from '@patternfly/react-core'; import { useField } from 'formik'; import HelpPopover from '~/components/HelpPopover'; import { LEARN_MORE_ABOUT_INTEGRATION_TESTS } from '~/consts/documentation'; import { ExternalLink } from '~/shared'; import { InputField, RadioGroupField, CheckboxField } from '~/shared/components/formik-base'; import { ResourceKind } from '~/types/coreBuildService'; import { RESOURCE_NAME_REGEX_MSG } from '../../../utils/validation-utils'; import ContextsField from '../ContextsField'; import FormikParamsField from '../FormikParamsField'; type Props = { isInPage?: boolean; edit?: boolean }; const IntegrationTestSection: React.FC> = ({ isInPage, edit }) => { const [, { touched, error }] = useField({ name: 'integrationTest.url', type: 'input', }); const validated = touched ? touched && !error ? ValidatedOptions.success : ValidatedOptions.error : ValidatedOptions.default; return ( <> {!isInPage && ( <> Add integration test To test all your components after code commit, add an integration test. Integration tests run in parallel using temporary environments. )} Where do we look for your integration test configurations ?{' '} } options={[ { value: ResourceKind.pipeline, label: 'Pipeline', }, { value: ResourceKind.pipelineRun, label: 'Pipeline Run', }, ]} /> ); }; export default IntegrationTestSection;