Fixed single record select hotkeys (#9433)

There is a problem of hotkey scope not being passed to the relation
picker used for single record select fields.

Fixed it where we open a single record select.
This commit is contained in:
Lucas Bordeau
2025-01-07 17:06:06 +01:00
committed by GitHub
parent 0c75b244ba
commit 6129052850
10 changed files with 77 additions and 38 deletions

View File

@ -51,13 +51,13 @@ export const WithOpenMonthSelect: Story = {
'October',
'November',
'December',
].forEach((monthLabel) =>
expect(canvas.getByText(monthLabel)).toBeInTheDocument(),
].forEach(async (monthLabel) =>
expect(await canvas.findByText(monthLabel)).toBeInTheDocument(),
);
await userEvent.click(canvas.getByText('February'));
await userEvent.click(await canvas.findByText('February'));
expect(canvas.getByText('February')).toBeInTheDocument();
expect(await canvas.findByText('February')).toBeInTheDocument();
},
};
@ -69,12 +69,12 @@ export const WithOpenYearSelect: Story = {
await userEvent.click(yearSelect);
['2024', '2025', '2026'].forEach((yearLabel) =>
expect(canvas.getByText(yearLabel)).toBeInTheDocument(),
['2024', '2025', '2026'].forEach(async (yearLabel) =>
expect(await canvas.findByText(yearLabel)).toBeInTheDocument(),
);
await userEvent.click(canvas.getByText('2024'));
await userEvent.click(await canvas.findByText('2024'));
expect(canvas.getByText('2024')).toBeInTheDocument();
expect(await canvas.findByText('2024')).toBeInTheDocument();
},
};