File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
amplify-migration-apps/mood-board/tests Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,32 @@ describe('guest', () => {
247247 guest ( ) . graphql ( { query : getKinesisEvents } ) ,
248248 ) . rejects . toBeDefined ( ) ;
249249 } ) ;
250+
251+ describe ( 'resolver overrides' , ( ) => {
252+ it ( 'listBoards prepends pin emoji to board names' , async ( ) => {
253+ const name = `Override Test ${ Date . now ( ) } ` ;
254+ await guest ( ) . graphql ( {
255+ query : createBoard ,
256+ variables : { input : { name } } ,
257+ } ) ;
258+
259+ const listResult = await guest ( ) . graphql ( { query : listBoards } ) ;
260+ const items = ( listResult as any ) . data . listBoards . items ;
261+ const found = items . find ( ( b : any ) => b . name === `📌 ${ name } ` ) ;
262+
263+ expect ( found ) . toBeDefined ( ) ;
264+ } ) ;
265+
266+ it ( 'listBoards caps results at 50 even when higher limit is requested' , async ( ) => {
267+ const listResult = await guest ( ) . graphql ( {
268+ query : listBoards ,
269+ variables : { limit : 100 } ,
270+ } ) ;
271+ const items = ( listResult as any ) . data . listBoards . items ;
272+
273+ expect ( items . length ) . toBeLessThanOrEqual ( 50 ) ;
274+ } ) ;
275+ } ) ;
250276} ) ;
251277
252278describe ( 'auth' , ( ) => {
You can’t perform that action at this time.
0 commit comments