type Props = {
popupPosition?: {},
onFail: Error => void,
+ organization: string,
selectedTags: Array<string>,
setTags: (Array<string>) => void
};
onSearch = (query: string) => {
searchIssueTags({
q: query || '',
- ps: Math.min(this.props.selectedTags.length - 1 + LIST_SIZE, 100)
+ ps: Math.min(this.props.selectedTags.length - 1 + LIST_SIZE, 100),
+ organization: this.props.organization
}).then((tags: Array<string>) => {
if (this.mounted) {
this.setState({ searchResult: tags });
it('should render tags popup correctly', () => {
const element = shallow(
- <SetIssueTagsPopup onFail={jest.fn()} selectedTags="mytag" setTags={jest.fn()} />
+ <SetIssueTagsPopup
+ onFail={jest.fn()}
+ organization="foo"
+ selectedTags="mytag"
+ setTags={jest.fn()}
+ />
);
element.setState({ searchResult: ['mytag', 'test', 'second'] });
expect(element).toMatchSnapshot();