Step 8.1: Remove skinning setup from all tests

This commit is contained in:
Travis Ralston 2022-03-22 23:22:53 -06:00
parent 9350c50f87
commit a987ead7d2
57 changed files with 3 additions and 129 deletions

View file

@ -20,7 +20,6 @@ import { mocked } from 'jest-mock';
import { logger } from 'matrix-js-sdk/src/logger';
import { act } from 'react-dom/test-utils';
import '../../../skinned-sdk';
import RecordingPlayback from '../../../../src/components/views/audio_messages/RecordingPlayback';
import { Playback } from '../../../../src/audio/Playback';
import RoomContext, { TimelineRenderingType } from '../../../../src/contexts/RoomContext';

View file

@ -17,7 +17,6 @@ limitations under the License.
import React from "react";
import { mount } from "enzyme";
import "../../../skinned-sdk";
import ContextMenu, { ChevronFace } from "../../../../src/components/structures/ContextMenu";
import UIStore from "../../../../src/stores/UIStore";

View file

@ -21,7 +21,6 @@ import { Room } from 'matrix-js-sdk/src/models/room';
import { PendingEventOrdering } from 'matrix-js-sdk/src/matrix';
import { ExtensibleEvent, MessageEvent, M_POLL_KIND_DISCLOSED, PollStartEvent } from 'matrix-events-sdk';
import '../../../skinned-sdk';
import * as TestUtils from '../../../test-utils';
import MessageContextMenu from '../../../../src/components/views/context_menus/MessageContextMenu';
import { MatrixClientPeg } from '../../../../src/MatrixClientPeg';

View file

@ -20,7 +20,6 @@ import { Room } from 'matrix-js-sdk/src/matrix';
import { mocked } from 'jest-mock';
import { act } from 'react-dom/test-utils';
import '../../../skinned-sdk';
import SpaceContextMenu from '../../../../src/components/views/context_menus/SpaceContextMenu';
import MatrixClientContext from '../../../../src/contexts/MatrixClientContext';
import { findByTestId } from '../../../test-utils';

View file

@ -20,7 +20,6 @@ import { mocked } from 'jest-mock';
import { act } from "react-dom/test-utils";
import { Room } from 'matrix-js-sdk/src/matrix';
import '../../../skinned-sdk';
import ExportDialog from '../../../../src/components/views/dialogs/ExportDialog';
import { ExportType, ExportFormat } from '../../../../src/utils/exportUtils/exportUtils';
import { createTestClient, mkStubRoom } from '../../../test-utils';

View file

@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import "../../../skinned-sdk";
import React from "react";
import { mount } from "enzyme";
import { act } from "react-dom/test-utils";

View file

@ -20,8 +20,6 @@ import { jest } from "@jest/globals";
import { Room } from "matrix-js-sdk/src/models/room";
import { MatrixWidgetType } from "matrix-widget-api";
// We can't use the usual `skinned-sdk`, as it stubs out the RightPanel
import "../../../minimal-sdk";
import RightPanel from "../../../../src/components/structures/RightPanel";
import { MatrixClientPeg } from "../../../../src/MatrixClientPeg";
import ResizeNotifier from "../../../../src/utils/ResizeNotifier";

View file

@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import '../../../skinned-sdk';
import { Direction, mouseWithinRegion } from "../../../../src/components/views/elements/InteractiveTooltip";
describe("InteractiveTooltip", () => {

View file

@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// skinned-sdk should be the first import in most tests
import '../../../skinned-sdk';
import React from "react";
import { mount, ReactWrapper } from "enzyme";
import { Room } from "matrix-js-sdk/src/models/room";

View file

@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import "../../../skinned-sdk";
import * as testUtils from '../../../test-utils';
import { getParentEventId } from "../../../../src/utils/Reply";

View file

@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import "../../../skinned-sdk";
import React from 'react';
import { mount } from 'enzyme';

View file

@ -1,5 +1,3 @@
// skinned-sdk should be the first import in most tests
import '../../../skinned-sdk';
import React from "react";
import {
renderIntoDocument,

View file

@ -23,7 +23,6 @@ import { MatrixClient } from 'matrix-js-sdk/src/client';
import { mocked } from 'jest-mock';
import { logger } from 'matrix-js-sdk/src/logger';
import "../../../skinned-sdk"; // Must be first for skinning to work
import LocationPicker from "../../../../src/components/views/location/LocationPicker";
import { LocationShareType } from "../../../../src/components/views/location/shareLocation";
import MatrixClientContext from '../../../../src/contexts/MatrixClientContext';

View file

@ -24,7 +24,6 @@ import { M_BEACON_INFO } from 'matrix-js-sdk/src/@types/beacon';
import { M_ASSET, LocationAssetType } from 'matrix-js-sdk/src/@types/location';
import { logger } from 'matrix-js-sdk/src/logger';
import '../../../skinned-sdk';
import LocationShareMenu from '../../../../src/components/views/location/LocationShareMenu';
import MatrixClientContext from '../../../../src/contexts/MatrixClientContext';
import { ChevronFace } from '../../../../src/components/structures/ContextMenu';

View file

@ -1,4 +1,3 @@
import '../../../skinned-sdk'; // Must be first for skinning to work
import React from 'react';
import TestRenderer from 'react-test-renderer';
import { EventEmitter } from 'events';

View file

@ -21,7 +21,6 @@ import { act } from "react-dom/test-utils";
import { Room, User, MatrixClient } from 'matrix-js-sdk/src/matrix';
import { Phase, VerificationRequest } from 'matrix-js-sdk/src/crypto/verification/request/VerificationRequest';
import "../../../skinned-sdk";
import UserInfo from '../../../../src/components/views/right_panel/UserInfo';
import { RightPanelPhases } from '../../../../src/stores/right-panel/RightPanelStorePhases';
import { MatrixClientPeg } from '../../../../src/MatrixClientPeg';

View file

@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import "../../../skinned-sdk";
import React from 'react';
import ReactTestUtils from 'react-dom/test-utils';
import ReactDOM from 'react-dom';

View file

@ -2,7 +2,6 @@ import React from 'react';
import { mount, ReactWrapper } from 'enzyme';
import { Room, PendingEventOrdering, MatrixEvent, MatrixClient } from 'matrix-js-sdk/src/matrix';
import "../../../skinned-sdk";
import * as TestUtils from '../../../test-utils';
import { MatrixClientPeg } from '../../../../src/MatrixClientPeg';
import DMRoomMap from '../../../../src/utils/DMRoomMap';

View file

@ -23,7 +23,6 @@ import {
} from 'react-dom/test-utils';
import { Room, RoomMember, MatrixError, IContent } from 'matrix-js-sdk/src/matrix';
import "../../../skinned-sdk";
import { stubClient } from '../../../test-utils';
import { MatrixClientPeg } from '../../../../src/MatrixClientPeg';
import DMRoomMap from '../../../../src/utils/DMRoomMap';

View file

@ -20,7 +20,6 @@ import { sleep } from "matrix-js-sdk/src/utils";
import { MatrixClient } from "matrix-js-sdk/src/matrix";
import { mount } from 'enzyme';
import '../../../skinned-sdk'; // Must be first for skinning to work
import SendMessageComposer, {
createMessageContent,
isQuickReaction,

View file

@ -1,5 +1,3 @@
import '../../../skinned-sdk';
import React, { ReactElement } from 'react';
import ReactDOM from 'react-dom';
import { MatrixClient } from 'matrix-js-sdk/src/matrix';

View file

@ -17,7 +17,6 @@ limitations under the License.
import React from 'react';
import { mount } from "enzyme";
import '../../../skinned-sdk';
import * as TestUtils from "../../../test-utils";
import FontScalingPanel from '../../../../src/components/views/settings/FontScalingPanel';

View file

@ -14,7 +14,6 @@ limitations under the License.
import React from 'react';
import { mount } from 'enzyme';
import '../../../skinned-sdk';
import { IPushRule, IPushRules, RuleId, IPusher } from 'matrix-js-sdk/src/matrix';
import { IThreepid, ThreepidMedium } from 'matrix-js-sdk/src/@types/threepids';
import { act } from 'react-dom/test-utils';

View file

@ -17,7 +17,6 @@ limitations under the License.
import React from 'react';
import { mount } from "enzyme";
import '../../../skinned-sdk';
import * as TestUtils from "../../../test-utils";
import ThemeChoicePanel from '../../../../src/components/views/settings/ThemeChoicePanel';

View file

@ -19,7 +19,6 @@ import { mount } from 'enzyme';
import { mocked } from 'jest-mock';
import { act } from 'react-dom/test-utils';
import '../../../skinned-sdk';
import QuickThemeSwitcher from '../../../../src/components/views/spaces/QuickThemeSwitcher';
import { getOrderedThemes } from '../../../../src/theme';
import ThemeChoicePanel from '../../../../src/components/views/settings/ThemeChoicePanel';

View file

@ -20,7 +20,6 @@ import { mocked } from 'jest-mock';
import { MatrixClient } from 'matrix-js-sdk/src/matrix';
import { act } from "react-dom/test-utils";
import '../../../skinned-sdk';
import SpacePanel from '../../../../src/components/views/spaces/SpacePanel';
import { MatrixClientPeg } from '../../../../src/MatrixClientPeg';
import { SpaceKey } from '../../../../src/stores/spaces';

View file

@ -1,5 +1,3 @@
// skinned-sdk should be the first import in most tests
import '../../../skinned-sdk';
import React from "react";
import { mocked } from 'jest-mock';
import {