Grid filtering tests

- Added tests for grid filtering functionality.