1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-09 08:42:50 +03:00

Bump react-focus-lock (#7858)

* react-focus-lock to 2.5.1

Signed-off-by: Kerry Archibald <kerrya@element.io>

* use enzyme in ASSD test so focus lock finds active element

Signed-off-by: Kerry Archibald <kerrya@element.io>

* findById and flushPromises to test utils

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry
2022-02-21 18:09:01 +01:00
committed by GitHub
parent 8b9263c808
commit 9db59d75b9
7 changed files with 64 additions and 96 deletions

View File

@@ -103,4 +103,8 @@ export const mkSpace = (
export const emitPromise = (e: EventEmitter, k: string | symbol) => new Promise(r => e.once(k, r));
export const findByTestId = (component: ReactWrapper, id: string) => component.find(`[data-test-id="${id}"]`);
const findByAttr = (attr: string) => (component: ReactWrapper, value: string) => component.find(`[${attr}="${value}"]`);
export const findByTestId = findByAttr('data-test-id');
export const findById = findByAttr('id');
export const flushPromises = async () => await new Promise(resolve => setTimeout(resolve));