File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,31 @@ export function createIntegrationTestsSuite(
175175 await client . close ( ) ;
176176 } ) ;
177177
178+ // It should filter out all rental Actors only if we run locally or as standby, where
179+ // we cannot access MongoDB to get the user's rented Actors.
180+ // In case of apify-mcp-server it should include user's rented Actors.
181+ it ( 'should filter out all rental Actors from store search' , async ( ) => {
182+ const client = await createClientFn ( ) ;
183+
184+ const result = await client . callTool ( {
185+ name : HelperTools . STORE_SEARCH ,
186+ arguments : {
187+ search : 'rental' ,
188+ limit : 100 ,
189+ } ,
190+ } ) ;
191+ const content = result . content as { text : string } [ ] ;
192+ const actors = content . map ( ( item ) => JSON . parse ( item . text ) ) ;
193+ expect ( actors . length ) . toBeGreaterThan ( 0 ) ;
194+
195+ // Check that no rental Actors are present
196+ for ( const actor of actors ) {
197+ expect ( actor . currentPricingInfo . pricingModel ) . not . toBe ( 'FLAT_PRICE_PER_MONTH' ) ;
198+ }
199+
200+ await client . close ( ) ;
201+ } ) ;
202+
178203 // Execute only when we can get the MCP server instance - currently skips only stdio
179204 // is skipped because we are running a compiled version through node and there is no way (easy)
180205 // to get the MCP server instance
You can’t perform that action at this time.
0 commit comments