Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
fa0fae86
Commit
fa0fae86
authored
Aug 01, 2014
by
gergely-ujvari
Committed by
Randall Leeds
Aug 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
searchfilter uses tag instead of tags
parent
9ffe1bbc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
searchfilters.coffee
h/static/scripts/searchfilters.coffee
+1
-1
directives-test.coffee
tests/js/directives-test.coffee
+5
-6
No files found.
h/static/scripts/searchfilters.coffee
View file @
fa0fae86
...
@@ -110,7 +110,7 @@ class SearchFilter
...
@@ -110,7 +110,7 @@ class SearchFilter
terms
:
since
terms
:
since
operator
:
'and'
operator
:
'and'
lowercase
:
false
lowercase
:
false
tag
:
tag
s
:
terms
:
tag
terms
:
tag
operator
:
'and'
operator
:
'and'
lowercase
:
true
lowercase
:
true
...
...
tests/js/directives-test.coffee
View file @
fa0fae86
...
@@ -136,7 +136,6 @@ describe 'h.directives', ->
...
@@ -136,7 +136,6 @@ describe 'h.directives', ->
describe
'.simpleSearch'
,
->
describe
'.simpleSearch'
,
->
$element
=
null
$element
=
null
beforeEach
->
beforeEach
->
$scope
.
query
=
{}
$scope
.
update
=
sinon
.
spy
()
$scope
.
update
=
sinon
.
spy
()
$scope
.
clear
=
sinon
.
spy
()
$scope
.
clear
=
sinon
.
spy
()
...
@@ -152,12 +151,12 @@ describe 'h.directives', ->
...
@@ -152,12 +151,12 @@ describe 'h.directives', ->
$scope
.
$digest
()
$scope
.
$digest
()
it
'updates the search-bar'
,
->
it
'updates the search-bar'
,
->
$scope
.
query
=
{
query
:
"Test query"
}
$scope
.
query
=
"Test query"
$scope
.
$digest
()
$scope
.
$digest
()
assert
.
equal
(
$scope
.
searchtext
,
$scope
.
query
.
query
)
assert
.
equal
(
$scope
.
searchtext
,
$scope
.
query
)
it
'calls the given search function'
,
->
it
'calls the given search function'
,
->
$scope
.
query
=
{
query
:
"Test query"
}
$scope
.
query
=
"Test query"
$scope
.
$digest
()
$scope
.
$digest
()
$element
.
trigger
(
'submit'
)
$element
.
trigger
(
'submit'
)
sinon
.
assert
.
calledWith
(
$scope
.
update
,
"Test query"
)
sinon
.
assert
.
calledWith
(
$scope
.
update
,
"Test query"
)
...
@@ -167,7 +166,7 @@ describe 'h.directives', ->
...
@@ -167,7 +166,7 @@ describe 'h.directives', ->
assert
(
$scope
.
clear
.
called
)
assert
(
$scope
.
clear
.
called
)
it
'clears the search-bar'
,
->
it
'clears the search-bar'
,
->
$scope
.
query
=
{
query
:
"Test query"
}
$scope
.
query
=
"Test query"
$scope
.
$digest
()
$scope
.
$digest
()
$element
.
find
(
'.simple-search-clear'
).
click
()
$element
.
find
(
'.simple-search-clear'
).
click
()
assert
.
equal
(
$scope
.
searchtext
,
''
)
assert
.
equal
(
$scope
.
searchtext
,
''
)
...
@@ -177,7 +176,7 @@ describe 'h.directives', ->
...
@@ -177,7 +176,7 @@ describe 'h.directives', ->
assert
.
include
(
$form
.
prop
(
'className'
),
'simple-search-inactive'
)
assert
.
include
(
$form
.
prop
(
'className'
),
'simple-search-inactive'
)
it
'removes the class from the form when there is an input value'
,
->
it
'removes the class from the form when there is an input value'
,
->
$scope
.
query
=
{
query
:
"Test query"
}
$scope
.
query
=
"Test query"
$scope
.
$digest
()
$scope
.
$digest
()
$form
=
$element
.
find
(
'.simple-search-form'
)
$form
=
$element
.
find
(
'.simple-search-form'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment