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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 64 additions and 96 deletions

View file

@ -29,6 +29,7 @@ import {
import { IContent, MatrixEvent } from 'matrix-js-sdk/src/models/event';
import * as TestUtils from "../../../test-utils";
import { findById } from '../../../utils/test-utils';
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
import _PollCreateDialog from "../../../../src/components/views/elements/PollCreateDialog";
const PollCreateDialog = TestUtils.wrapInMatrixClientContext(_PollCreateDialog);
@ -40,8 +41,6 @@ Date.now = jest.fn(() => 2345678901234);
// eslint-disable-next-line no-extend-native
Date.prototype.toISOString = jest.fn(() => "2021-11-23T14:35:14.240Z");
const findById = (component, id) => component.find(`[id="${id}"]`);
afterAll(() => {
Date.now = realDateNow;
// eslint-disable-next-line no-extend-native