mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 23:42:12 +00:00
* fixes #10173 - Task page search bar only searches task titles, not Notes (#10173) * Fixing unit test: Test expect task to have note, but it has notes.
This commit is contained in:
parent
a6106a801b
commit
21cf5d2321
2 changed files with 5 additions and 5 deletions
|
|
@ -145,17 +145,17 @@ describe('Task Column', () => {
|
|||
tasks = [
|
||||
{
|
||||
text: 'Hello world 1',
|
||||
note: '',
|
||||
notes: '',
|
||||
checklist: [],
|
||||
},
|
||||
{
|
||||
text: 'Hello world 2',
|
||||
note: '',
|
||||
notes: '',
|
||||
checklist: [],
|
||||
},
|
||||
{
|
||||
text: 'Generic Task Title',
|
||||
note: '',
|
||||
notes: '',
|
||||
checklist: [
|
||||
{ text: 'Check 1' },
|
||||
{ text: 'Check 2' },
|
||||
|
|
@ -164,7 +164,7 @@ describe('Task Column', () => {
|
|||
},
|
||||
{
|
||||
text: 'Hello world 3',
|
||||
note: 'Generic Task Note',
|
||||
notes: 'Generic Task Note',
|
||||
checklist: [
|
||||
{ text: 'Checkitem 1' },
|
||||
{ text: 'Checkitem 2' },
|
||||
|
|
|
|||
|
|
@ -584,7 +584,7 @@ export default {
|
|||
/* eslint-disable no-extra-parens */
|
||||
return (
|
||||
task.text.toLowerCase().indexOf(searchTextLowerCase) > -1 ||
|
||||
(task.note && task.note.toLowerCase().indexOf(searchTextLowerCase) > -1) ||
|
||||
(task.notes && task.notes.toLowerCase().indexOf(searchTextLowerCase) > -1) ||
|
||||
(task.checklist && task.checklist.length > 0 &&
|
||||
task.checklist.some(checkItem => checkItem.text.toLowerCase().indexOf(searchTextLowerCase) > -1))
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue