mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01: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:
committed by
Sabe Jones
parent
a6106a801b
commit
21cf5d2321
@@ -145,17 +145,17 @@ describe('Task Column', () => {
|
|||||||
tasks = [
|
tasks = [
|
||||||
{
|
{
|
||||||
text: 'Hello world 1',
|
text: 'Hello world 1',
|
||||||
note: '',
|
notes: '',
|
||||||
checklist: [],
|
checklist: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Hello world 2',
|
text: 'Hello world 2',
|
||||||
note: '',
|
notes: '',
|
||||||
checklist: [],
|
checklist: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Generic Task Title',
|
text: 'Generic Task Title',
|
||||||
note: '',
|
notes: '',
|
||||||
checklist: [
|
checklist: [
|
||||||
{ text: 'Check 1' },
|
{ text: 'Check 1' },
|
||||||
{ text: 'Check 2' },
|
{ text: 'Check 2' },
|
||||||
@@ -164,7 +164,7 @@ describe('Task Column', () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Hello world 3',
|
text: 'Hello world 3',
|
||||||
note: 'Generic Task Note',
|
notes: 'Generic Task Note',
|
||||||
checklist: [
|
checklist: [
|
||||||
{ text: 'Checkitem 1' },
|
{ text: 'Checkitem 1' },
|
||||||
{ text: 'Checkitem 2' },
|
{ text: 'Checkitem 2' },
|
||||||
|
|||||||
@@ -584,7 +584,7 @@ export default {
|
|||||||
/* eslint-disable no-extra-parens */
|
/* eslint-disable no-extra-parens */
|
||||||
return (
|
return (
|
||||||
task.text.toLowerCase().indexOf(searchTextLowerCase) > -1 ||
|
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 && task.checklist.length > 0 &&
|
||||||
task.checklist.some(checkItem => checkItem.text.toLowerCase().indexOf(searchTextLowerCase) > -1))
|
task.checklist.some(checkItem => checkItem.text.toLowerCase().indexOf(searchTextLowerCase) > -1))
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user