Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
corinagum authored and tonyanziano committed Sep 10, 2019
1 parent 7035842 commit 7bccc93
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import * as React from 'react';
import { mount, ReactWrapper, shallow } from 'enzyme';
import { Provider } from 'react-redux';
import ReactWebChat, { createDirectLine } from 'botframework-webchat';
import ReactWebChat, { createDirectLine, createStyleSet } from 'botframework-webchat';
import { ActivityTypes } from 'botframework-schema';
import { ValueTypes } from '@bfemulator/app-shared';
import { combineReducers, createStore } from 'redux';
Expand Down Expand Up @@ -145,13 +145,19 @@ describe('<ChatContainer />', () => {
describe('when there is a direct line client', () => {
it('renders the WebChat component with correct props', () => {
const webChat = render().find(ReactWebChat);
const styleSet = createStyleSet({ ...webChatStyleOptions });

styleSet.uploadButton = {
...styleSet.uploadButton,
padding: '1px',
};

expect(webChat.props()).toMatchObject({
activityMiddleware: expect.any(Function),
bot: { id: defaultDocument.botId, name: 'Bot' },
directLine: defaultDocument.directLine,
locale: 'en-US',
styleOptions: webChatStyleOptions,
styleSet: styleSet,
userID: '123',
username: 'Current User',
});
Expand Down

0 comments on commit 7bccc93

Please # to comment.