Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const SelectDialogMenu: React.FC<SelectDialogMenuProps> = (props) => {
text: d.displayName,
isSelected: value === d.displayName,
data: d,
role: 'option',
iconProps: {
iconName: getIconName(d),
styles: {
Expand All @@ -141,6 +142,7 @@ export const SelectDialogMenu: React.FC<SelectDialogMenuProps> = (props) => {
sectionProps: {
items: dialogItems,
},
role: 'option',
},
{
key: 'actions',
Expand All @@ -154,13 +156,15 @@ export const SelectDialogMenu: React.FC<SelectDialogMenuProps> = (props) => {
iconProps: {
iconName: Icons.EXPRESSION,
},
role: 'option',
},
{
key: ADD_DIALOG,
text: formatMessage('Create a new dialog'),
iconProps: {
iconName: 'Add',
},
role: 'option',
},
],
},
Expand Down Expand Up @@ -266,6 +270,7 @@ export const SelectDialogMenu: React.FC<SelectDialogMenuProps> = (props) => {
}
`,
}}
role="listbox"
styles={buttonStyles}
text={selectedLabel || ' '}
onBlur={() => onBlur?.(id, value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('Select Dialog', () => {
const menu = await findByLabelText('Dialog name');
fireEvent.click(menu);

const createItem = getAllByRole(baseElement, 'menuitem').pop();
const createItem = getAllByRole(baseElement, 'option').pop();
expect(createItem).toHaveTextContent('Create a new dialog');
act(() => {
fireEvent.click(createItem);
Expand All @@ -79,7 +79,7 @@ describe('Select Dialog', () => {
const menu = await findByLabelText('Dialog name');
fireEvent.click(menu);

const [dialog] = getAllByRole(baseElement, 'menuitem');
const [dialog] = getAllByRole(baseElement, 'option');
expect(dialog).toHaveTextContent('dialog2');
act(() => {
fireEvent.click(dialog);
Expand Down