Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 661b8d5

Browse files
committed
Step 8.7: Introduce focus-visible import where needed to repair tests
There is an import in `MatrixChat` which no longer gets executed when we don't skin the entire app, so bring it in manually.
1 parent b2b818a commit 661b8d5

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/components/structures/MatrixChat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { logger } from "matrix-js-sdk/src/logger";
3232
import { throttle } from "lodash";
3333
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
3434

35-
// focus-visible is a Polyfill for the :focus-visible CSS pseudo-attribute used by _AccessibleButton.scss
35+
// focus-visible is a Polyfill for the :focus-visible CSS pseudo-attribute used by various components
3636
import 'focus-visible';
3737
// what-input helps improve keyboard accessibility
3838
import 'what-input';

test/components/structures/ThreadPanel-test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License.
1616

1717
import React from 'react';
1818
import { shallow, mount } from "enzyme";
19+
import 'focus-visible'; // to fix context menus
1920

2021
import {
2122
ThreadFilterType,

test/components/views/context_menus/SpaceContextMenu-test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { mount } from 'enzyme';
1919
import { Room } from 'matrix-js-sdk/src/matrix';
2020
import { mocked } from 'jest-mock';
2121
import { act } from 'react-dom/test-utils';
22+
import 'focus-visible'; // to fix context menus
2223

2324
import SpaceContextMenu from '../../../../src/components/views/context_menus/SpaceContextMenu';
2425
import MatrixClientContext from '../../../../src/contexts/MatrixClientContext';

0 commit comments

Comments
 (0)