mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-20 05:56:53 +00:00
test(reservations): pick the confirm button without Array.at, which the ES2020 lib lacks
This commit is contained in:
@@ -34,7 +34,10 @@ const defaultProps = {
|
||||
};
|
||||
|
||||
/** The question a delete asks sits in its own portal; its Delete is the last one on the page. */
|
||||
const confirmDeleteButton = () => screen.getAllByRole('button', { name: 'Delete' }).at(-1)!;
|
||||
const confirmDeleteButton = () => {
|
||||
const buttons = screen.getAllByRole('button', { name: 'Delete' });
|
||||
return buttons[buttons.length - 1];
|
||||
};
|
||||
|
||||
/** A card's head band carries its own Edit and Delete, named by their tooltips. */
|
||||
const cardAction = (title: string, name: 'Edit' | 'Delete') =>
|
||||
|
||||
Reference in New Issue
Block a user