ghost-portal/packages/page-bounties/test/utils/clickButtonWithName.ts
Jaco f512c1a539
Bump de & api (w/ __Unused on enum) (#6326)
* Bump de & api (w/ __Unused on enum)

* Linting fixes

* tsc adjustments

* Api bump
2021-10-17 16:37:57 +03:00

11 lines
393 B
TypeScript

// Copyright 2017-2021 @polkadot/app-bounties authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { fireEvent } from '@testing-library/react';
export async function clickButtonWithName (buttonName: string, findByRole: (...args: any[]) => Promise<HTMLElement>): Promise<void> {
const button = await findByRole('button', { name: buttonName });
fireEvent.click(button);
}