src: Remove unused data-testids
This removes unused `data-testid`s from the code base.
This commit is contained in:
parent
2ec85661c4
commit
aedbbdc53a
24 changed files with 76 additions and 143 deletions
|
|
@ -114,14 +114,7 @@ const BlueprintsSidebar = () => {
|
|||
return (
|
||||
<EmptyBlueprintState
|
||||
icon={PlusCircleIcon}
|
||||
action={
|
||||
<Link
|
||||
to={resolveRelPath('imagewizard')}
|
||||
data-testid="create-blueprint-action-emptystate"
|
||||
>
|
||||
Add blueprint
|
||||
</Link>
|
||||
}
|
||||
action={<Link to={resolveRelPath('imagewizard')}>Add blueprint</Link>}
|
||||
titleText="No blueprints yet"
|
||||
bodyText="Add a blueprint and optionally build related images."
|
||||
/>
|
||||
|
|
@ -224,7 +217,6 @@ const BlueprintSearch = ({ blueprintsTotal }: blueprintSearchProps) => {
|
|||
onChange={(_event, value) => onChange(value)}
|
||||
onClear={() => onChange('')}
|
||||
resultsCount={`${blueprintsTotal} blueprints`}
|
||||
data-testid="blueprints-search-input"
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -155,7 +155,6 @@ export const BuildImagesButton = ({ children }: BuildImagesButtonPropTypes) => {
|
|||
<MenuList>
|
||||
{blueprintImageType?.map((imageType, index) => (
|
||||
<MenuItem
|
||||
data-testid="blueprint-menu-items"
|
||||
key={imageType}
|
||||
hasCheckbox
|
||||
itemId={index}
|
||||
|
|
|
|||
|
|
@ -258,7 +258,6 @@ export const ImportBlueprintModal: React.FunctionComponent<
|
|||
aria-label="Import Custom Repositories checkbox"
|
||||
id="checkbox-import-custom-repositories"
|
||||
name="Import Repositories"
|
||||
data-testid="checkbox-import-custom-repositories"
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup fieldId="import-blueprint-file-upload">
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ const FileSystemConfiguration = () => {
|
|||
<FileSystemTable />
|
||||
<TextContent>
|
||||
<Button
|
||||
data-testid="file-system-add-partition"
|
||||
className="pf-v5-u-text-align-left"
|
||||
variant="link"
|
||||
icon={<PlusCircleIcon />}
|
||||
|
|
|
|||
|
|
@ -87,10 +87,8 @@ const FirstBootStep = () => {
|
|||
}}
|
||||
code={selectedScript}
|
||||
height="35vh"
|
||||
emptyStateButton={<span data-testid="firstboot_browse">Browse</span>}
|
||||
emptyStateLink={
|
||||
<span data-testid="firstboot_write_manual">Start from scratch</span>
|
||||
}
|
||||
emptyStateButton="Browse"
|
||||
emptyStateLink="Start from scratch"
|
||||
/>
|
||||
{errors.script && (
|
||||
<FormHelperText>
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ const TargetEnvironment = () => {
|
|||
>
|
||||
<FormGroup
|
||||
label={<Text component={TextVariants.small}>Public cloud</Text>}
|
||||
data-testid="target-public"
|
||||
>
|
||||
<div className="tiles">
|
||||
{supportedEnvironments?.includes('aws') && (
|
||||
|
|
@ -170,7 +169,6 @@ const TargetEnvironment = () => {
|
|||
{supportedEnvironments?.includes('oci') && (
|
||||
<Tile
|
||||
className="tile pf-v5-u-mr-sm"
|
||||
data-testid="upload-oci"
|
||||
title="Oracle Cloud Infrastructure"
|
||||
icon={
|
||||
<img
|
||||
|
|
@ -195,7 +193,6 @@ const TargetEnvironment = () => {
|
|||
<FormGroup
|
||||
label={<Text component={TextVariants.small}>Private cloud</Text>}
|
||||
className="pf-v5-u-mt-sm"
|
||||
data-testid="target-private"
|
||||
>
|
||||
<Checkbox
|
||||
label="VMware vSphere"
|
||||
|
|
@ -319,10 +316,7 @@ const TargetEnvironment = () => {
|
|||
</FormGroup>
|
||||
</>
|
||||
)}
|
||||
<FormGroup
|
||||
label={<Text component={TextVariants.small}>Other</Text>}
|
||||
data-testid="target-other"
|
||||
>
|
||||
<FormGroup label={<Text component={TextVariants.small}>Other</Text>}>
|
||||
{supportedEnvironments?.includes('guest-image') && (
|
||||
<Checkbox
|
||||
label="Virtualization - Guest image (.qcow2)"
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ const PolicySelector = () => {
|
|||
);
|
||||
|
||||
return (
|
||||
<FormGroup data-testid="profiles-form-group" label="Policy">
|
||||
<FormGroup label="Policy">
|
||||
<Select
|
||||
isScrollable
|
||||
isOpen={isOpen}
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ const ProfileSelector = () => {
|
|||
);
|
||||
|
||||
return (
|
||||
<FormGroup data-testid="profiles-form-group" label="Profile">
|
||||
<FormGroup label="Profile">
|
||||
<Select
|
||||
isScrollable
|
||||
isOpen={isOpen}
|
||||
|
|
@ -368,10 +368,7 @@ const ProfileSelector = () => {
|
|||
>
|
||||
<SelectList>
|
||||
{isFetching && (
|
||||
<SelectOption
|
||||
value="loader"
|
||||
data-testid="openscap-profiles-fetching"
|
||||
>
|
||||
<SelectOption value="loader">
|
||||
<Spinner size="lg" />
|
||||
</SelectOption>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -227,7 +227,6 @@ const PackageRecommendations = () => {
|
|||
component="a"
|
||||
onClick={() => addAllPackages()}
|
||||
isInline
|
||||
data-testid="add-all-recommendations-button"
|
||||
>
|
||||
Add all packages
|
||||
</Button>
|
||||
|
|
@ -272,7 +271,6 @@ const PackageRecommendations = () => {
|
|||
}}
|
||||
isInline
|
||||
isDisabled={isRecommendedPackageSelected(pkg)}
|
||||
data-testid="add-recommendation-button"
|
||||
>
|
||||
Add package
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -1467,7 +1467,6 @@ const Packages = () => {
|
|||
<ToggleGroupItem
|
||||
text="Available"
|
||||
buttonId="toggle-available"
|
||||
data-testid="packages-available-toggle"
|
||||
isSelected={toggleSelected === 'toggle-available'}
|
||||
onChange={handleFilterToggleClick}
|
||||
/>
|
||||
|
|
@ -1480,7 +1479,6 @@ const Packages = () => {
|
|||
: ' (100+)'
|
||||
}`}
|
||||
buttonId="toggle-selected"
|
||||
data-testid="packages-selected-toggle"
|
||||
isSelected={toggleSelected === 'toggle-selected'}
|
||||
onChange={handleFilterToggleClick}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ const ActivationKeyInformation = (): JSX.Element => {
|
|||
<Th>Name</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody data-testid="additional-repositories-table">
|
||||
<Tbody>
|
||||
{activationKeyInfo.body?.additionalRepositories?.map(
|
||||
(repo, index) => (
|
||||
<Tr key={index}>
|
||||
|
|
@ -123,7 +123,6 @@ const ActivationKeyInformation = (): JSX.Element => {
|
|||
}
|
||||
>
|
||||
<Button
|
||||
data-testid="repositories-popover-button"
|
||||
variant="link"
|
||||
aria-label="Show additional repositories"
|
||||
className="pf-v5-u-pl-0 pf-v5-u-pt-0 pf-v5-u-pb-0"
|
||||
|
|
|
|||
|
|
@ -191,11 +191,7 @@ const ActivationKeysList = () => {
|
|||
|
||||
if (!isSuccessActivationKeys && isFetchingActivationKeys) {
|
||||
selectOptionsElement.push(
|
||||
<SelectOption
|
||||
key="Fetching"
|
||||
value="loader"
|
||||
data-testid="activation-keys-loading"
|
||||
>
|
||||
<SelectOption key="Fetching" value="loader">
|
||||
<Spinner size="md" />
|
||||
</SelectOption>
|
||||
);
|
||||
|
|
@ -250,7 +246,6 @@ const ActivationKeysList = () => {
|
|||
Activation key to use for this image <PopoverActivation />
|
||||
</>
|
||||
}
|
||||
data-testid="subscription-activation-key"
|
||||
>
|
||||
<Select
|
||||
isScrollable
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@ const Registration = () => {
|
|||
description={
|
||||
<Button
|
||||
component="a"
|
||||
data-testid="registration-additional-options"
|
||||
variant="link"
|
||||
isDisabled={!registrationType.startsWith('register-now')}
|
||||
isInline
|
||||
|
|
@ -162,7 +161,6 @@ const Registration = () => {
|
|||
<InsightsPopover />
|
||||
</>
|
||||
}
|
||||
data-testid="registration-checkbox-insights"
|
||||
isChecked={
|
||||
registrationType === 'register-now-insights' ||
|
||||
registrationType === 'register-now-rhc'
|
||||
|
|
@ -185,7 +183,6 @@ const Registration = () => {
|
|||
<RhcPopover />
|
||||
</>
|
||||
}
|
||||
data-testid="registration-checkbox-rhc"
|
||||
isChecked={registrationType === 'register-now-rhc'}
|
||||
onChange={(_event, checked) => {
|
||||
if (checked) {
|
||||
|
|
@ -218,7 +215,6 @@ const Registration = () => {
|
|||
{isSatelliteRegistrationEnabled && (
|
||||
<Radio
|
||||
label="Register with Satellite"
|
||||
data-testid="register-satellite-radio"
|
||||
isChecked={registrationType === 'register-satellite'}
|
||||
onChange={() => {
|
||||
dispatch(changeRegistrationType('register-satellite'));
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ const PopoverActivation = () => {
|
|||
<Button
|
||||
variant="plain"
|
||||
aria-label="Activation key popover"
|
||||
aria-describedby="subscription-activation-key"
|
||||
className="pf-v5-u-pl-sm pf-v5-u-pt-0 pf-v5-u-pb-0 pf-v5-u-pr-0"
|
||||
>
|
||||
<HelpIcon />
|
||||
|
|
|
|||
|
|
@ -575,7 +575,7 @@ const Repositories = () => {
|
|||
refetch={refresh}
|
||||
/>
|
||||
) : (
|
||||
<Table variant="compact" data-testid="repositories-table">
|
||||
<Table variant="compact">
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th aria-label="Selected" />
|
||||
|
|
@ -607,10 +607,7 @@ const Repositories = () => {
|
|||
);
|
||||
|
||||
return (
|
||||
<Tr
|
||||
key={`${uuid}-${rowIndex}`}
|
||||
data-testid="repositories-row"
|
||||
>
|
||||
<Tr key={`${uuid}-${rowIndex}`}>
|
||||
<Td
|
||||
select={{
|
||||
isSelected: selected.has(uuid),
|
||||
|
|
@ -704,7 +701,7 @@ const Repositories = () => {
|
|||
<Grid>
|
||||
<Panel>
|
||||
<PanelMain>
|
||||
<Table variant="compact" data-testid="repositories-table">
|
||||
<Table variant="compact">
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th aria-label="Selected" />
|
||||
|
|
@ -731,10 +728,7 @@ const Repositories = () => {
|
|||
} = repo;
|
||||
|
||||
return (
|
||||
<Tr
|
||||
key={`${uuid}-${rowIndex}`}
|
||||
data-testid="repositories-row"
|
||||
>
|
||||
<Tr key={`${uuid}-${rowIndex}`}>
|
||||
<Td
|
||||
select={{
|
||||
isSelected: true,
|
||||
|
|
|
|||
|
|
@ -66,58 +66,56 @@ const ReviewWizardFooter = () => {
|
|||
|
||||
return (
|
||||
<WizardFooterWrapper>
|
||||
<div data-testid="wizard-save-button-div">
|
||||
<Dropdown
|
||||
isOpen={isOpen}
|
||||
onOpenChange={(isOpen: boolean) => setIsOpen(isOpen)}
|
||||
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
||||
<MenuToggle
|
||||
variant="primary"
|
||||
ref={toggleRef}
|
||||
onClick={onToggleClick}
|
||||
isExpanded={isOpen}
|
||||
isDisabled={!isValid}
|
||||
splitButtonOptions={{
|
||||
variant: 'action',
|
||||
items: composeId
|
||||
? [
|
||||
<EditSaveButton
|
||||
key="wizard-edit-save-btn"
|
||||
getBlueprintPayload={getBlueprintPayload}
|
||||
setIsOpen={setIsOpen}
|
||||
blueprintId={composeId}
|
||||
isDisabled={!isValid}
|
||||
/>,
|
||||
]
|
||||
: [
|
||||
<CreateSaveButton
|
||||
key="wizard-create-save-btn"
|
||||
getBlueprintPayload={getBlueprintPayload}
|
||||
setIsOpen={setIsOpen}
|
||||
isDisabled={!isValid}
|
||||
/>,
|
||||
],
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
shouldFocusToggleOnSelect
|
||||
>
|
||||
{composeId ? (
|
||||
<EditSaveAndBuildBtn
|
||||
getBlueprintPayload={getBlueprintPayload}
|
||||
setIsOpen={setIsOpen}
|
||||
blueprintId={composeId}
|
||||
isDisabled={!isValid}
|
||||
/>
|
||||
) : (
|
||||
<CreateSaveAndBuildBtn
|
||||
getBlueprintPayload={getBlueprintPayload}
|
||||
setIsOpen={setIsOpen}
|
||||
isDisabled={!isValid}
|
||||
/>
|
||||
)}
|
||||
</Dropdown>
|
||||
</div>
|
||||
<Dropdown
|
||||
isOpen={isOpen}
|
||||
onOpenChange={(isOpen: boolean) => setIsOpen(isOpen)}
|
||||
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
||||
<MenuToggle
|
||||
variant="primary"
|
||||
ref={toggleRef}
|
||||
onClick={onToggleClick}
|
||||
isExpanded={isOpen}
|
||||
isDisabled={!isValid}
|
||||
splitButtonOptions={{
|
||||
variant: 'action',
|
||||
items: composeId
|
||||
? [
|
||||
<EditSaveButton
|
||||
key="wizard-edit-save-btn"
|
||||
getBlueprintPayload={getBlueprintPayload}
|
||||
setIsOpen={setIsOpen}
|
||||
blueprintId={composeId}
|
||||
isDisabled={!isValid}
|
||||
/>,
|
||||
]
|
||||
: [
|
||||
<CreateSaveButton
|
||||
key="wizard-create-save-btn"
|
||||
getBlueprintPayload={getBlueprintPayload}
|
||||
setIsOpen={setIsOpen}
|
||||
isDisabled={!isValid}
|
||||
/>,
|
||||
],
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
shouldFocusToggleOnSelect
|
||||
>
|
||||
{composeId ? (
|
||||
<EditSaveAndBuildBtn
|
||||
getBlueprintPayload={getBlueprintPayload}
|
||||
setIsOpen={setIsOpen}
|
||||
blueprintId={composeId}
|
||||
isDisabled={!isValid}
|
||||
/>
|
||||
) : (
|
||||
<CreateSaveAndBuildBtn
|
||||
getBlueprintPayload={getBlueprintPayload}
|
||||
setIsOpen={setIsOpen}
|
||||
isDisabled={!isValid}
|
||||
/>
|
||||
)}
|
||||
</Dropdown>
|
||||
<Button variant="secondary" onClick={goToPrevStep}>
|
||||
Back
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ export const FSReviewTable = () => {
|
|||
<Th>Minimum size</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody data-testid="file-system-configuration-tbody-review">
|
||||
<Tbody>
|
||||
{partitions.map((partition, partitionIndex) => (
|
||||
<Tr key={partitionIndex}>
|
||||
<Td className="pf-m-width-30">{partition.mountpoint}</Td>
|
||||
|
|
@ -175,7 +175,7 @@ export const SnapshotTable = ({
|
|||
<Th>Last snapshot date</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody data-testid="packages-tbody-review">
|
||||
<Tbody>
|
||||
{data?.data?.map(({ uuid, name, last_snapshot }, pkgIndex) => (
|
||||
<Tr key={pkgIndex}>
|
||||
<Td>{name}</Td>
|
||||
|
|
@ -224,7 +224,7 @@ export const PackagesTable = () => {
|
|||
<Th>Package repository</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody data-testid="packages-tbody-review">
|
||||
<Tbody>
|
||||
{packages.map((pkg, pkgIndex) => (
|
||||
<Tr key={pkgIndex}>
|
||||
<Td className="pf-m-width-30">{pkg.name}</Td>
|
||||
|
|
@ -277,7 +277,7 @@ export const RepositoriesTable = () => {
|
|||
<Th>Name</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody data-testid="repositories-tbody-review">
|
||||
<Tbody>
|
||||
{repositoriesList.map((repo, repoIndex) => (
|
||||
<Tr key={repoIndex + 1}>
|
||||
<Td className="pf-m-width-60">
|
||||
|
|
|
|||
|
|
@ -160,10 +160,7 @@ export const FSCList = () => {
|
|||
>
|
||||
Configuration type
|
||||
</TextListItem>
|
||||
<TextListItem
|
||||
component={TextListItemVariants.dd}
|
||||
data-testid="partitioning-auto-manual"
|
||||
>
|
||||
<TextListItem component={TextListItemVariants.dd}>
|
||||
{fileSystemConfigurationType === 'manual' ? 'Manual' : 'Automatic'}
|
||||
{fileSystemConfigurationType === 'manual' && (
|
||||
<>
|
||||
|
|
@ -176,7 +173,6 @@ export const FSCList = () => {
|
|||
bodyContent={<FSReviewTable />}
|
||||
>
|
||||
<Button
|
||||
data-testid="file-system-configuration-popover"
|
||||
variant="link"
|
||||
aria-label="File system configuration info"
|
||||
aria-describedby="file-system-configuration-info"
|
||||
|
|
@ -526,10 +522,7 @@ export const ContentList = () => {
|
|||
>
|
||||
Repeatable build
|
||||
</TextListItem>
|
||||
<TextListItem
|
||||
component={TextListItemVariants.dd}
|
||||
data-testid="snapshot-method"
|
||||
>
|
||||
<TextListItem component={TextListItemVariants.dd}>
|
||||
<Popover
|
||||
position="bottom"
|
||||
headerContent={
|
||||
|
|
@ -572,10 +565,7 @@ export const ContentList = () => {
|
|||
<TextListItem component={TextListItemVariants.dt}>
|
||||
Custom repositories
|
||||
</TextListItem>
|
||||
<TextListItem
|
||||
component={TextListItemVariants.dd}
|
||||
data-testid="custom-repositories-count"
|
||||
>
|
||||
<TextListItem component={TextListItemVariants.dd}>
|
||||
{customRepositories?.length + recommendedRepositories.length > 0 ? (
|
||||
<Popover
|
||||
position="bottom"
|
||||
|
|
@ -603,10 +593,7 @@ export const ContentList = () => {
|
|||
>
|
||||
Additional packages
|
||||
</TextListItem>
|
||||
<TextListItem
|
||||
component={TextListItemVariants.dd}
|
||||
data-testid="chosen-packages-count"
|
||||
>
|
||||
<TextListItem component={TextListItemVariants.dd}>
|
||||
{packages?.length > 0 || groups?.length > 0 ? (
|
||||
<Popover
|
||||
position="bottom"
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ const Templates = () => {
|
|||
onPerPageSelect={handlePerPageSelect}
|
||||
isCompact
|
||||
/>
|
||||
<Table variant="compact" data-testid="templates-table">
|
||||
<Table variant="compact">
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th aria-label="Selected" />
|
||||
|
|
|
|||
|
|
@ -134,11 +134,7 @@ export const AzureResourceGroups = () => {
|
|||
);
|
||||
|
||||
return (
|
||||
<FormGroup
|
||||
isRequired
|
||||
label={'Resource group'}
|
||||
data-testid="azure-resource-groups"
|
||||
>
|
||||
<FormGroup isRequired label={'Resource group'}>
|
||||
<Select
|
||||
isScrollable
|
||||
isOpen={isOpen}
|
||||
|
|
@ -151,10 +147,7 @@ export const AzureResourceGroups = () => {
|
|||
>
|
||||
<SelectList>
|
||||
{isFetching && (
|
||||
<SelectOption
|
||||
value="loader"
|
||||
data-testid="azure-resource-groups-loading"
|
||||
>
|
||||
<SelectOption value="loader">
|
||||
<Spinner size="lg" />
|
||||
</SelectOption>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ export const AzureSourcesSelect = () => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<FormGroup isRequired label={'Source name'} data-testid="azure-sources">
|
||||
<FormGroup isRequired label={'Source name'}>
|
||||
<Select
|
||||
isScrollable
|
||||
isOpen={isOpen}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ const Gcp = () => {
|
|||
<FormGroup label="Select image sharing" isRequired>
|
||||
<Radio
|
||||
id="share-with-google"
|
||||
data-testid="share-with-google"
|
||||
label="Share image with a Google account"
|
||||
name="radio-1"
|
||||
description={
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ const EmptyBlueprintsImagesTable = () => (
|
|||
<EmptyStateHeader
|
||||
icon={<EmptyStateIcon icon={PlusCircleIcon} />}
|
||||
titleText="No images"
|
||||
data-testid="empty-state-header"
|
||||
/>
|
||||
<EmptyStateBody>
|
||||
<Text>
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ export const ImageBuilderHeader = ({
|
|||
isOpen={showImportModal}
|
||||
/>
|
||||
)}
|
||||
<PageHeader data-testid="image-builder-header">
|
||||
<PageHeader>
|
||||
<Flex>
|
||||
<FlexItem>
|
||||
<PageHeaderTitle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue