role has been corrected to combobox for the dropdown (#1438)

This commit is contained in:
MokireddySampath 2023-05-09 23:29:56 +05:30 committed by GitHub
parent c7d1b2dcdb
commit 9267b2cc18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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();
});

View File

@ -165,7 +165,7 @@ export const NewVertexComponent: FunctionComponent<INewVertexComponentProps> = (
</div>
<div>
<Dropdown
role="listbox"
role="combobox"
placeholder="Select an option"
defaultSelectedKey={data.values[0].type}
style={{ width: 100 }}