Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Improving redirect on guest accounts #3739

Merged
merged 6 commits into from
Oct 8, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
moving tests to the new correct place
  • Loading branch information
jespino committed Sep 30, 2019
commit e90547ec68bb2ac0175d5921523a7247b5b7809d
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,20 @@
import React from 'react';
import {shallow} from 'enzyme';

import ChannelView from './channel_view.jsx';
import ChannelController from './channel_controller.jsx';

describe('components/ChannelView', () => {
describe('components/channel_layout/ChannelController', () => {
const props = {
channelId: 'channelId',
deactivatedChannel: true,
match: {
url: '/team/channels/off-topic',
},
showTutorial: false,
channelIsArchived: false,
viewArchivedChannels: false,
actions: {
goToLastViewedChannel: jest.fn(),
},
pathName: 'test',
teamType: 'test',
fetchingChannels: false,
};
test('Should have app__body and channel-view classes on body after mount', () => {
Object.defineProperty(window.navigator, 'platform', {
value: 'Win32',
writable: true,
});
shallow(<ChannelView {...props}/>);
shallow(<ChannelController {...props}/>);

expect(document.body.classList.contains('app__body')).toBe(true);
expect(document.body.classList.contains('channel-view')).toBe(true);
Expand All @@ -36,7 +28,7 @@ describe('components/ChannelView', () => {
value: 'Win32',
writable: true,
});
shallow(<ChannelView {...props}/>);
shallow(<ChannelController {...props}/>);

expect(document.body.classList.contains('os--windows')).toBe(true);
});
Expand All @@ -46,7 +38,7 @@ describe('components/ChannelView', () => {
value: 'Win32',
writable: true,
});
shallow(<ChannelView {...props}/>);
shallow(<ChannelController {...props}/>);

expect(document.body.classList.contains('os--windows')).toBe(true);
});
Expand All @@ -56,7 +48,7 @@ describe('components/ChannelView', () => {
value: 'MacIntel',
writable: true,
});
shallow(<ChannelView {...props}/>);
shallow(<ChannelController {...props}/>);

expect(document.body.classList.contains('os--mac')).toBe(true);
});
Expand All @@ -66,7 +58,7 @@ describe('components/ChannelView', () => {
value: 'MacPPC',
writable: true,
});
shallow(<ChannelView {...props}/>);
shallow(<ChannelController {...props}/>);

expect(document.body.classList.contains('os--mac')).toBe(true);
});
Expand All @@ -76,7 +68,7 @@ describe('components/ChannelView', () => {
value: 'MacPPC',
writable: true,
});
const wrapper = shallow(<ChannelView {...props}/>);
const wrapper = shallow(<ChannelController {...props}/>);

wrapper.unmount();
expect(document.body.classList.contains('app__body')).toBe(false);
Expand Down