11 lines
365 B
TypeScript
11 lines
365 B
TypeScript
// Copyright 2017-2022 @polkadot/app-bounties authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { fireEvent } from '@testing-library/react';
|
|
|
|
export const clickElementWithText = async (text: string, findByText: (name: string) => Promise<HTMLElement>): Promise<void> => {
|
|
const element = await findByText(text);
|
|
|
|
fireEvent.click(element);
|
|
};
|