Skip to content

Migrate from Enzyme to React Testing Library #6919

@jpuzz0

Description

@jpuzz0

Describe the issue. What is the expected and unexpected behavior?
We'll soon be upgrading to the latest version of React (18), and since Enzyme will not be supported with this version, we'll need an alternative to writing tests...enter React Testing Library, which has quickly become the go-to for react component testing.

Initially, it makes sense to have both libraries live side-by-side so we can incrementally migrate per component or bundles of components depending on the complexity of existing tests.

Issues (with component migration sub-tasks bundled together).

When merged, please check the components covered below.

By component name:

  • CodeEditor
  • AboutModal
  • Accordion
  • Alert
  • AlertActionCloseButton
  • AlertGroup
  • ApplicationLauncherSeparator
  • Button
  • Card
  • CardBody
  • CardFooter
  • CardHeader
  • CardHeaderMain
  • CardHeadMain
  • CardTitle
  • Checkbox
  • ChipGroup
  • ClipboardCopyToggle
  • ContextSelector
  • ContextSelectorToggle
  • DataList
  • Dropdown
  • DropdownToggle
  • DropdownToggleCheckbox
  • InternalDropdownItem
  • DropdownItem
  • DropdownSeparator
  • NavList
  • OptionsMenuItem
  • OverflowMenuDropdownItem
  • SelectGroup
  • SelectMenu
  • SelectOption
  • ToolbarToggleGroup
  • EmptyState
  • FormGroup
  • FormHelperText
  • FormSelect
  • InputGroup
  • InputGroupText
  • Label
  • LabelGroup
  • LoginFooterItem
  • LoginForm
  • LoginMainBody
  • LoginMainFooter
  • LoginMainFooterBandItem
  • LoginMainFooterLinksItem
  • LoginMainHeader
  • List
  • Menu
  • Modal
  • ModalBoxCloseButton
  • Nav
  • NotificationDrawer
  • NotificationDrawerBody
  • NotificationDrawerGroup
  • NotificationDrawerGroupList
  • NotificationDrawerHeader
  • NotificationDrawerList
  • NotificationDrawerListItem
  • NotificationDrawerListItemBody
  • NotificationDrawerListItemHeader
  • OverflowMenu
  • OverflowMenuControl
  • OverflowMenuItem
  • OverflowMenuGroup
  • Page
  • Pagination
  • Radio
  • SearchInput
  • Select
  • SelectToggle
  • SimpleList
  • Switch
  • TextArea
  • TextInput
  • TextInputGroup
  • TimePicker
  • Title
  • ToggleGroup
  • Wizard
  • Bullseye
  • Flex
  • AccessConsole
  • DesktopViewer
  • SerialConsole
  • XTerm
  • VncConsoleActions
  • MultipleFileUpload
  • MultipleFileUploadButton
  • MultipleFileUploadInfo
  • MultipleFileUploadMain
  • MultipleFileUploadStatus
  • MultipleFileUploadStatusItem
  • MultipleFileUploadTitle
  • MultipleFileUploadTitleIcon
  • MultipleFileUploadTitleText
  • MultipleFileUploadTitleTextSeparator
  • Table
  • ComputeElementDimensions
  • SVGDefs
  • Defs
  • TopologyControlBar
  • TopologySideBar
  • TopologyView

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions