From b508939cb955172f197acdaef9c6db8b34712ceb Mon Sep 17 00:00:00 2001 From: Lenny Chen Date: Wed, 10 Jan 2024 14:49:33 -0800 Subject: [PATCH] change pack table test time out and change search field to display name --- src/components/PacksTable/PackTable.test.tsx | 2 +- src/components/PacksTable/PacksTable.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/PacksTable/PackTable.test.tsx b/src/components/PacksTable/PackTable.test.tsx index 7dfb5e1e85..f8743b6680 100644 --- a/src/components/PacksTable/PackTable.test.tsx +++ b/src/components/PacksTable/PackTable.test.tsx @@ -70,7 +70,7 @@ describe("FilteredTable Tests", () => { // Fire the event to change the search textbox fireEvent.change(screen.getByRole("textbox"), { target: { value: "Amazon" } }); - await new Promise((resolve) => setTimeout(resolve, 300)); + await new Promise((resolve) => setTimeout(resolve, 800)); // Now run the expectations expect(screen.getByText("Amazon EKS optimized Linux")).toBeInTheDocument(); diff --git a/src/components/PacksTable/PacksTable.tsx b/src/components/PacksTable/PacksTable.tsx index a78783f1ba..b02e73c151 100644 --- a/src/components/PacksTable/PacksTable.tsx +++ b/src/components/PacksTable/PacksTable.tsx @@ -175,7 +175,7 @@ const FilteredTable: React.FC = () => { }, []); const filteredPacks = searchValue - ? deprecatedPacks.filter((pack) => pack.name.toLowerCase().includes(searchValue.toLowerCase())) + ? deprecatedPacks.filter((pack) => pack.displayName.toLowerCase().includes(searchValue.toLowerCase())) : deprecatedPacks; return (