Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 5fa4b3b

Browse files
committed
Add spec for has-no-results
1 parent 53db29a commit 5fa4b3b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

spec/find-view-spec.coffee

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,17 @@ describe 'FindView', ->
518518
expect(findView.descriptionLabel).toHaveClass 'text-error'
519519
expect(findView.descriptionLabel.text()).toContain 'Invalid regular expression'
520520

521+
it "adds the has-no-results class", ->
522+
findView.findEditor.setText 'it'
523+
atom.commands.dispatch(findView.findEditor.element, 'core:confirm')
524+
expect(findView).toHaveClass 'has-results'
525+
expect(findView).not.toHaveClass 'has-no-results'
526+
527+
findView.findEditor.setText 'i[t'
528+
atom.commands.dispatch(findView.findEditor.element, 'core:confirm')
529+
expect(findView).toHaveClass 'has-no-results'
530+
expect(findView).not.toHaveClass 'has-results'
531+
521532
it "will be reset when there is no longer an error", ->
522533
expect(findView.descriptionLabel).toHaveClass 'text-error'
523534

0 commit comments

Comments
 (0)