Step 8.5: Move leave behaviour
This commit is contained in:
parent
90270ee468
commit
1c8ac2c2e5
8 changed files with 169 additions and 148 deletions
|
@ -24,13 +24,13 @@ import SpaceContextMenu from '../../../../src/components/views/context_menus/Spa
|
|||
import MatrixClientContext from '../../../../src/contexts/MatrixClientContext';
|
||||
import { findByTestId } from '../../../test-utils';
|
||||
import {
|
||||
leaveSpace,
|
||||
shouldShowSpaceSettings,
|
||||
showCreateNewRoom,
|
||||
showCreateNewSubspace,
|
||||
showSpaceInvite,
|
||||
showSpaceSettings,
|
||||
} from '../../../../src/utils/space';
|
||||
import { leaveSpace } from "../../../../src/utils/leave-behaviour";
|
||||
import { shouldShowComponent } from '../../../../src/customisations/helpers/UIComponents';
|
||||
import { UIComponent } from '../../../../src/settings/UIFeature';
|
||||
|
||||
|
@ -39,7 +39,6 @@ jest.mock('../../../../src/customisations/helpers/UIComponents', () => ({
|
|||
}));
|
||||
|
||||
jest.mock('../../../../src/utils/space', () => ({
|
||||
leaveSpace: jest.fn(),
|
||||
shouldShowSpaceSettings: jest.fn(),
|
||||
showCreateNewRoom: jest.fn(),
|
||||
showCreateNewSubspace: jest.fn(),
|
||||
|
@ -48,6 +47,10 @@ jest.mock('../../../../src/utils/space', () => ({
|
|||
showSpaceSettings: jest.fn(),
|
||||
}));
|
||||
|
||||
jest.mock('../../../../src/utils/leave-behaviour', () => ({
|
||||
leaveSpace: jest.fn(),
|
||||
}));
|
||||
|
||||
describe('<SpaceContextMenu />', () => {
|
||||
const userId = '@test:server';
|
||||
const mockClient = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue