@@ -22,10 +22,10 @@ function setupTestData() {
2222 const { testData } = getTestData ( ) ;
2323 ( global . fetch as FetchMockSandbox )
2424 . get (
25- 'begin:https://treeherder.mozilla.org/api/project/try/push/?author_contains =' ,
25+ 'begin:https://treeherder.mozilla.org/api/project/try/push/?search =' ,
2626 ( url ) => {
27- const author = new URL ( url ) . searchParams . get ( 'author_contains ' ) ;
28- return { results : testData . filter ( ( item ) => item . author === author ) } ;
27+ const search = new URL ( url ) . searchParams . get ( 'search ' ) ;
28+ return { results : testData . filter ( ( item ) => item . author === search ) } ;
2929 } ,
3030 )
3131 . get (
@@ -134,7 +134,7 @@ describe('Search Container', () => {
134134 } ) ;
135135
136136 const baseInput = screen . getByPlaceholderText (
137- 'Search base by ID number or author email' ,
137+ 'Search base by ID number, author email or bug number ' ,
138138 ) ;
139139 const repoDropdown = screen . getByRole ( 'button' , { name : 'Base' } ) ;
140140
@@ -160,13 +160,15 @@ describe('Base and OverTime Search', () => {
160160
161161 // Search input appears
162162 expect (
163- screen . getByPlaceholderText ( / S e a r c h b a s e b y I D n u m b e r o r a u t h o r e m a i l / i) ,
163+ screen . getByPlaceholderText (
164+ / S e a r c h b a s e b y I D n u m b e r , a u t h o r e m a i l o r b u g n u m b e r / i,
165+ ) ,
164166 ) . toBeInTheDocument ( ) ;
165167
166168 await expandOverTimeComponent ( ) ;
167169 expect (
168170 screen . getAllByPlaceholderText (
169- / S e a r c h r e v i s i o n b y I D n u m b e r o r a u t h o r e m a i l / i,
171+ / S e a r c h r e v i s i o n b y I D n u m b e r , a u t h o r e m a i l o r b u g n u m b e r / i,
170172 ) [ 1 ] ,
171173 ) . toBeInTheDocument ( ) ;
172174
@@ -299,11 +301,11 @@ describe('Base and OverTime Search', () => {
299301300302 // The call to coconut@python .co was debounced.
301303 expect ( global . fetch ) . not . toHaveBeenCalledWith (
302- 'https://treeherder.mozilla.org/api/project/try/push/?author_contains =johncleese%40python.co' ,
304+ 'https://treeherder.mozilla.org/api/project/try/push/?search =johncleese%40python.co' ,
303305 undefined ,
304306 ) ;
305307 expect ( global . fetch ) . toHaveBeenCalledWith (
306- 'https://treeherder.mozilla.org/api/project/try/push/?author_contains =johncleese%40python.com' ,
308+ 'https://treeherder.mozilla.org/api/project/try/push/?search =johncleese%40python.com' ,
307309 undefined ,
308310 ) ;
309311 expect ( global . fetch ) . toHaveBeenCalledTimes ( 4 ) ;
@@ -319,7 +321,7 @@ describe('Base and OverTime Search', () => {
319321 act ( ( ) => void jest . runAllTimers ( ) ) ;
320322
321323 expect ( global . fetch ) . toHaveBeenCalledWith (
322- 'https://treeherder.mozilla.org/api/project/try/push/?author_contains =terrygilliam%40python.com' ,
324+ 'https://treeherder.mozilla.org/api/project/try/push/?search =terrygilliam%40python.com' ,
323325 undefined ,
324326 ) ;
325327
0 commit comments