fix threadsupport type issues in tests (#9359)
This commit is contained in:
parent
3e4f3152bc
commit
8399b63e7a
2 changed files with 5 additions and 5 deletions
|
@ -25,7 +25,7 @@ import {
|
|||
MsgType,
|
||||
Room,
|
||||
} from 'matrix-js-sdk/src/matrix';
|
||||
import { Thread } from 'matrix-js-sdk/src/models/thread';
|
||||
import { FeatureSupport, Thread } from 'matrix-js-sdk/src/models/thread';
|
||||
|
||||
import MessageActionBar from '../../../../src/components/views/messages/MessageActionBar';
|
||||
import {
|
||||
|
@ -388,13 +388,13 @@ describe('<MessageActionBar />', () => {
|
|||
|
||||
describe('thread button', () => {
|
||||
beforeEach(() => {
|
||||
Thread.setServerSideSupport(true, false);
|
||||
Thread.setServerSideSupport(FeatureSupport.Stable);
|
||||
});
|
||||
|
||||
describe('when threads feature is not enabled', () => {
|
||||
it('does not render thread button when threads does not have server support', () => {
|
||||
jest.spyOn(SettingsStore, 'getValue').mockReturnValue(false);
|
||||
Thread.setServerSideSupport(false, false);
|
||||
Thread.setServerSideSupport(FeatureSupport.None);
|
||||
const { queryByLabelText } = getComponent({ mxEvent: alicesMessageEvent });
|
||||
expect(queryByLabelText('Reply in thread')).toBeFalsy();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue