Fix CI
All checks were successful
Build and publish Docker image / build-and-push (push) Successful in 4m15s
CI / Check (push) Successful in 5m49s

This commit is contained in:
Andras Schmelczer 2026-06-06 20:37:54 +01:00
parent 719dd27600
commit b4d66a28c1
5 changed files with 14 additions and 15 deletions

View file

@ -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]
);
});

View file

@ -1,2 +0,0 @@
*
!.gitignore

View file

@ -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?;

View file

@ -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()