Fix frontend tests with connect function

This commit is contained in:
Ivan Diaz 2019-03-03 13:24:07 -03:00
parent f99767e884
commit a89973d366
2 changed files with 11 additions and 4 deletions

View File

@ -12,7 +12,14 @@ const TicketList = requireUnit('app-components/ticket-list', {
'core-components/button': Button,
'core-components/tooltip': Tooltip,
'app-components/department-dropdown': DepartmentDropdown,
'lib-app/i18n': i18n
'lib-app/i18n': i18n,
'react-redux': {
connect: function() {
return function(param) {
return param;
}
}
},
});
describe('TicketList component', function () {
@ -32,7 +39,8 @@ describe('TicketList component', function () {
author: {
id: 3,
name: 'Francisco Villegas'
}
},
tags: []
};
let list = _.range(5).map(() => ticket);

View File

@ -1,6 +1,6 @@
import React from 'react';
import _ from 'lodash';
import {connect} from "react-redux";
import {connect} from 'react-redux';
import i18n from 'lib-app/i18n';
import DateTransformer from 'lib-core/date-transformer';
@ -10,7 +10,6 @@ import DepartmentDropdown from 'app-components/department-dropdown';
import Table from 'core-components/table';
import Button from 'core-components/button';
import Tooltip from 'core-components/tooltip';
import Icon from 'core-components/icon';
import Checkbox from 'core-components/checkbox';
import Tag from 'core-components/tag';