You've already forked matrix-react-sdk
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:
@@ -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));
|
||||
|
Reference in New Issue
Block a user