mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
27c177dc2f
Summary: Fixes T1127 For now, colons are taken literally. This means you can't type scoped searches. This will likely change when search gets re-designed Test Plan: SearchBar.cjsx got a test for this. The class needs more tests edgehill --test Reviewers: bengotow Reviewed By: bengotow Subscribers: mg Maniphest Tasks: T1127 Differential Revision: https://review.inboxapp.com/D1490
19 lines
705 B
CoffeeScript
19 lines
705 B
CoffeeScript
React = require 'react'
|
|
ReactTestUtils = React.addons.TestUtils
|
|
|
|
{Actions} = require 'inbox-exports'
|
|
|
|
SearchBar = require '../lib/search-bar'
|
|
SearchSuggestionStore = require '../lib/search-suggestion-store.coffee'
|
|
|
|
describe 'SearchBar', ->
|
|
beforeEach ->
|
|
@searchBar = ReactTestUtils.renderIntoDocument(<SearchBar />)
|
|
input = ReactTestUtils.findRenderedDOMComponentWithTag(@searchBar, "input")
|
|
@input = React.findDOMNode(input)
|
|
|
|
it 'supports search queries with a colon character', ->
|
|
spyOn(Actions, "searchQueryChanged")
|
|
test = "::Hello: World::"
|
|
ReactTestUtils.Simulate.change @input, target: value: test
|
|
expect(Actions.searchQueryChanged).toHaveBeenCalledWith [all: test]
|