From b4d66a28c1f95591fcb19941846e6b20a8efd155 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sat, 6 Jun 2026 20:37:54 +0100 Subject: [PATCH] Fix CI --- .../src/components/map/LocationSearch.test.tsx | 14 +++++++++----- property-data2/.gitignore | 2 -- server-rs/src/main.rs | 3 +-- server-rs/src/routes/export.rs | 10 ++++------ uv-282b6c2ab09acf58.lock | 0 5 files changed, 14 insertions(+), 15 deletions(-) delete mode 100644 property-data2/.gitignore delete mode 100644 uv-282b6c2ab09acf58.lock diff --git a/frontend/src/components/map/LocationSearch.test.tsx b/frontend/src/components/map/LocationSearch.test.tsx index 7b5774a..5a66b7b 100644 --- a/frontend/src/components/map/LocationSearch.test.tsx +++ b/frontend/src/components/map/LocationSearch.test.tsx @@ -169,7 +169,7 @@ describe('LocationSearch', () => { }); }); - it('waits for nearest postcode selection before flying to a place result', async () => { + it('flies to a place result immediately and resolves its nearest postcode for the side panel', async () => { window.localStorage.setItem( RECENT_SEARCHES_STORAGE_KEY, JSON.stringify([ @@ -201,7 +201,11 @@ describe('LocationSearch', () => { fireEvent.focus(input); fireEvent.mouseDown(await screen.findByRole('button', { name: 'E14' })); - expect(onFlyTo).not.toHaveBeenCalled(); + // The camera moves straight away from the result's own coordinates, without + // waiting on the nearest-postcode lookup (which only feeds the side panel). + expect(onFlyTo).toHaveBeenCalledWith(51.505, -0.01, 16); + expect(onLocationSearched).not.toHaveBeenCalled(); + nearestLookup.resolve( jsonResponse({ postcode: 'E14 2DG', @@ -223,9 +227,9 @@ describe('LocationSearch', () => { markerLatitude: 51.505, markerLongitude: -0.01, }); - expect(onFlyTo).toHaveBeenCalledWith(51.505, -0.01, 16); - expect(onLocationSearched.mock.invocationCallOrder[0]).toBeLessThan( - onFlyTo.mock.invocationCallOrder[0] + expect(onFlyTo).toHaveBeenCalledTimes(1); + expect(onFlyTo.mock.invocationCallOrder[0]).toBeLessThan( + onLocationSearched.mock.invocationCallOrder[0] ); }); diff --git a/property-data2/.gitignore b/property-data2/.gitignore deleted file mode 100644 index d6b7ef3..0000000 --- a/property-data2/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore diff --git a/server-rs/src/main.rs b/server-rs/src/main.rs index 5722f16..351874d 100644 --- a/server-rs/src/main.rs +++ b/server-rs/src/main.rs @@ -539,8 +539,7 @@ async fn main() -> anyhow::Result<()> { let tile_reader = Arc::new(routes::init_tile_reader(tiles_path).await?); info!("PMTiles loaded successfully"); - let noise_overlay_reader = - init_required_tile_reader("Noise", &cli.noise_overlay_tiles).await?; + let noise_overlay_reader = init_required_tile_reader("Noise", &cli.noise_overlay_tiles).await?; let satellite_reader = init_required_tile_reader("Satellite", &cli.satellite_tiles).await?; let satellite_highres_reader = init_required_tile_reader("Satellite high-res", &cli.satellite_highres_tiles).await?; diff --git a/server-rs/src/routes/export.rs b/server-rs/src/routes/export.rs index cabc983..f36687e 100644 --- a/server-rs/src/routes/export.rs +++ b/server-rs/src/routes/export.rs @@ -796,12 +796,10 @@ pub async fn get_export( group.summary.merge_from(agg); } for group in by_outcode.values_mut() { - group - .members - .sort_by(|&a, &b| { - postcode_data.postcodes[postcode_aggs[a].0] - .cmp(&postcode_data.postcodes[postcode_aggs[b].0]) - }); + group.members.sort_by(|&a, &b| { + postcode_data.postcodes[postcode_aggs[a].0] + .cmp(&postcode_data.postcodes[postcode_aggs[b].0]) + }); } order .into_iter() diff --git a/uv-282b6c2ab09acf58.lock b/uv-282b6c2ab09acf58.lock deleted file mode 100644 index e69de29..0000000