From d39461cd62b02b9aa15dcb73ffc9ed34c3b7bf4a Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" Date: Fri, 4 Nov 2022 17:00:06 -0400 Subject: [PATCH] chore: Adds RTL tests to DropdownContainer --- .../DropdownContainer.stories.tsx | 6 +- .../DropdownContainer.test.tsx | 143 ++++++++++++++++++ .../DropdownContainer/Overview.stories.mdx | 17 +++ .../components/DropdownContainer/index.tsx | 54 +++---- .../src/components/Select/styles.tsx | 3 + 5 files changed, 193 insertions(+), 30 deletions(-) create mode 100644 superset-frontend/src/components/DropdownContainer/DropdownContainer.test.tsx create mode 100644 superset-frontend/src/components/DropdownContainer/Overview.stories.mdx diff --git a/superset-frontend/src/components/DropdownContainer/DropdownContainer.stories.tsx b/superset-frontend/src/components/DropdownContainer/DropdownContainer.stories.tsx index e2fe280dd470f..d72b1bdd39736 100644 --- a/superset-frontend/src/components/DropdownContainer/DropdownContainer.stories.tsx +++ b/superset-frontend/src/components/DropdownContainer/DropdownContainer.stories.tsx @@ -31,7 +31,7 @@ export default { const ITEMS_COUNT = 6; const ITEM_OPTIONS = 10; const MIN_WIDTH = 700; -const MAX_WIDTH = 1500; +const MAX_WIDTH = 1300; const HEIGHT = 400; const itemsOptions = Array.from({ length: ITEM_OPTIONS }).map((_, i) => ({ @@ -47,10 +47,10 @@ const generateItems = (overflowingState?: OverflowingState) => Array.from({ length: ITEMS_COUNT }).map((_, i) => ({ id: `el-${i}`, element: ( -
+