From ec109b3145ddceda0e35a1eeeb35422683a82783 Mon Sep 17 00:00:00 2001 From: Sampath Date: Sun, 16 Apr 2023 23:20:11 +0530 Subject: [PATCH] role has been changed to combobox and test updated --- .../Graph/NewVertexComponent/NewVertexComponent.test.tsx | 4 ++-- src/Explorer/Graph/NewVertexComponent/NewVertexComponent.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Explorer/Graph/NewVertexComponent/NewVertexComponent.test.tsx b/src/Explorer/Graph/NewVertexComponent/NewVertexComponent.test.tsx index d6437bc85..0ea1369e1 100644 --- a/src/Explorer/Graph/NewVertexComponent/NewVertexComponent.test.tsx +++ b/src/Explorer/Graph/NewVertexComponent/NewVertexComponent.test.tsx @@ -107,11 +107,11 @@ describe("New Vertex Component", () => { it("should call onTypeChange method on type dropdown change", () => { const DOWN_ARROW = { keyCode: 40 }; const onTypeChange = jest.fn(); - const dropdown = screen.getByRole("listbox"); + const dropdown = screen.getByRole("combobox"); dropdown.onclick = onTypeChange(); dropdown.onkeydown = onTypeChange(); - fireEvent.keyDown(screen.getByRole("listbox"), DOWN_ARROW); + fireEvent.keyDown(screen.getByRole("combobox"), DOWN_ARROW); fireEvent.click(screen.getByText(/number/)); expect(onTypeChange).toHaveBeenCalled(); }); diff --git a/src/Explorer/Graph/NewVertexComponent/NewVertexComponent.tsx b/src/Explorer/Graph/NewVertexComponent/NewVertexComponent.tsx index fce3d43e7..b4c00878f 100644 --- a/src/Explorer/Graph/NewVertexComponent/NewVertexComponent.tsx +++ b/src/Explorer/Graph/NewVertexComponent/NewVertexComponent.tsx @@ -165,7 +165,7 @@ export const NewVertexComponent: FunctionComponent = (