From 592a521f5328106a7cb8b84a6c5263b7a4e71605 Mon Sep 17 00:00:00 2001 From: edleeks87 Date: Thu, 10 Oct 2024 18:15:22 +0100 Subject: [PATCH] refactor(option-row): convert unit tests to RTL --- .../__snapshots__/option-row.spec.tsx.snap | 42 ---- .../option-row/option-row.component.tsx | 4 +- .../select/option-row/option-row.spec.tsx | 180 --------------- .../select/option-row/option-row.test.tsx | 218 ++++++++++++++++++ 4 files changed, 220 insertions(+), 224 deletions(-) delete mode 100644 src/components/select/option-row/__snapshots__/option-row.spec.tsx.snap delete mode 100644 src/components/select/option-row/option-row.spec.tsx create mode 100644 src/components/select/option-row/option-row.test.tsx diff --git a/src/components/select/option-row/__snapshots__/option-row.spec.tsx.snap b/src/components/select/option-row/__snapshots__/option-row.spec.tsx.snap deleted file mode 100644 index 6f3985d790..0000000000 --- a/src/components/select/option-row/__snapshots__/option-row.spec.tsx.snap +++ /dev/null @@ -1,42 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`OptionRow renders properly 1`] = ` -.c0 { - cursor: pointer; - width: 100%; - position: absolute; - top: 0; - left: 0; - background-color: var(--colorsUtilityMajor200); -} - -.c0:hover { - background-color: var(--colorsUtilityMajor100); -} - -.c0 td { - line-height: 16px; - padding: 12px 16px; -} - -.c0 td:first-child { - font-weight: 500; -} - - - - - - - -
- foo -
-`; diff --git a/src/components/select/option-row/option-row.component.tsx b/src/components/select/option-row/option-row.component.tsx index 9befd0198c..a443f78605 100644 --- a/src/components/select/option-row/option-row.component.tsx +++ b/src/components/select/option-row/option-row.component.tsx @@ -5,7 +5,7 @@ import guid from "../../../__internal__/utils/helpers/guid"; import StyledOptionRow from "./option-row.style"; import SelectListContext from "../__internal__/select-list/select-list.context"; -export interface OptionRowProps extends TagProps { +export interface OptionRowProps extends Omit { /** The option's visible text, displayed within of