Skip to content

Commit caba7db

Browse files
committed
fix tests
1 parent 50e4d13 commit caba7db

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

ashes/src/components/core/button-with-menu/button-with-menu.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Transition from 'react-transition-group/CSSTransitionGroup';
99

1010
// components
1111
import { PrimaryButton } from 'components/core/button';
12-
import { DropdownItem } from 'components/dropdown';
12+
import DropdownItem from 'components/dropdown/dropdownItem';
1313

1414
// styles
1515
import s from './button-with-menu.css';

ashes/src/components/core/dropdown/search-dropdown/search-dropdown.spec.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ describe('SearchDropdown', function() {
8989

9090
it('should not be spinner if loading and there is non-empty result', function() {
9191
const fetch = sinon.spy(() => Promise.resolve([]));
92-
const searchDropdown = mount(<SearchDropdown fetch={fetch} items={['one']} />);
92+
const searchDropdown = mount(<SearchDropdown fetch={fetch} initialItems={['one']} />);
9393

9494
searchDropdown.find('.pivot').simulate('click'); // open dropdown
9595
searchDropdown.find('.searchBarInput').simulate('change', { target: { value: 'foo' } }); // type `foo`
@@ -100,7 +100,7 @@ describe('SearchDropdown', function() {
100100

101101
it('should render value as displayText if no items with that value and no displayText', function() {
102102
const value = 'arfglauefah';
103-
const searchDropdown = mount(<SearchDropdown value={value} />);
103+
const searchDropdown = mount(<SearchDropdown initialValue={value} />);
104104

105105
expect(searchDropdown.find('.pivot').text()).to.equal(value);
106106
});
@@ -109,14 +109,14 @@ describe('SearchDropdown', function() {
109109
const value = 'val2';
110110
const displayText = 'displayText2';
111111
const items = [['val1', 'displayText1'], ['val2', displayText]];
112-
const searchDropdown = mount(<SearchDropdown items={items} value={value} />);
112+
const searchDropdown = mount(<SearchDropdown initialItems={items} initialValue={value} />);
113113

114114
expect(searchDropdown.find('.pivot').text()).to.equal(displayText);
115115
});
116116

117117
it('should use renderItem to display value if passed and value exists', function() {
118118
const displayText = 'bfkyrgfoaui';
119-
const searchDropdown = mount(<SearchDropdown value="value" renderItem={() => displayText} />);
119+
const searchDropdown = mount(<SearchDropdown initialValue="value" renderItem={() => displayText} />);
120120

121121
expect(searchDropdown.find('.pivot').text()).to.equal(displayText);
122122
});
@@ -131,7 +131,7 @@ describe('SearchDropdown', function() {
131131

132132
it('should close dropdown after clicking the same item second time', function() {
133133
const items = ['val1', 'val2'];
134-
const searchDropdown = mount(<SearchDropdown items={items} />);
134+
const searchDropdown = mount(<SearchDropdown initialItems={items} />);
135135

136136
searchDropdown.find('.pivot').simulate('click'); // open
137137
expect(searchDropdown.state('open')).to.be.true;

ashes/src/components/images/edit-image.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { autobind } from 'core-decorators';
66
import React, { Component } from 'react';
77

88
// components
9-
import { DateTime } from 'components/common/datetime';
9+
import { DateTime } from 'components/utils/datetime';
1010
import Modal from 'components/core/modal';
1111
import { FormField } from '../forms';
1212
import SaveCancel from 'components/core/save-cancel';

ashes/test/acceptance/table/pagesize.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ describe('PageSize', function() {
1515
it(`should render selected page size`, function*() {
1616
pageSize = yield renderIntoDocument(<PageSize setState={noop} value={25} />);
1717

18-
expect(pageSize.container.querySelector('.fc-dropdown__value').textContent).to.equal('View 25');
18+
expect(pageSize.container.querySelector('.dropdown').textContent).to.equal('View 25');
1919
});
2020
});

0 commit comments

Comments
 (0)