Fix CI
This commit is contained in:
parent
719dd27600
commit
b4d66a28c1
5 changed files with 14 additions and 15 deletions
|
|
@ -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(
|
window.localStorage.setItem(
|
||||||
RECENT_SEARCHES_STORAGE_KEY,
|
RECENT_SEARCHES_STORAGE_KEY,
|
||||||
JSON.stringify([
|
JSON.stringify([
|
||||||
|
|
@ -201,7 +201,11 @@ describe('LocationSearch', () => {
|
||||||
fireEvent.focus(input);
|
fireEvent.focus(input);
|
||||||
fireEvent.mouseDown(await screen.findByRole('button', { name: 'E14' }));
|
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(
|
nearestLookup.resolve(
|
||||||
jsonResponse({
|
jsonResponse({
|
||||||
postcode: 'E14 2DG',
|
postcode: 'E14 2DG',
|
||||||
|
|
@ -223,9 +227,9 @@ describe('LocationSearch', () => {
|
||||||
markerLatitude: 51.505,
|
markerLatitude: 51.505,
|
||||||
markerLongitude: -0.01,
|
markerLongitude: -0.01,
|
||||||
});
|
});
|
||||||
expect(onFlyTo).toHaveBeenCalledWith(51.505, -0.01, 16);
|
expect(onFlyTo).toHaveBeenCalledTimes(1);
|
||||||
expect(onLocationSearched.mock.invocationCallOrder[0]).toBeLessThan(
|
expect(onFlyTo.mock.invocationCallOrder[0]).toBeLessThan(
|
||||||
onFlyTo.mock.invocationCallOrder[0]
|
onLocationSearched.mock.invocationCallOrder[0]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
2
property-data2/.gitignore
vendored
2
property-data2/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
*
|
|
||||||
!.gitignore
|
|
||||||
|
|
@ -539,8 +539,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
let tile_reader = Arc::new(routes::init_tile_reader(tiles_path).await?);
|
let tile_reader = Arc::new(routes::init_tile_reader(tiles_path).await?);
|
||||||
info!("PMTiles loaded successfully");
|
info!("PMTiles loaded successfully");
|
||||||
|
|
||||||
let noise_overlay_reader =
|
let noise_overlay_reader = init_required_tile_reader("Noise", &cli.noise_overlay_tiles).await?;
|
||||||
init_required_tile_reader("Noise", &cli.noise_overlay_tiles).await?;
|
|
||||||
let satellite_reader = init_required_tile_reader("Satellite", &cli.satellite_tiles).await?;
|
let satellite_reader = init_required_tile_reader("Satellite", &cli.satellite_tiles).await?;
|
||||||
let satellite_highres_reader =
|
let satellite_highres_reader =
|
||||||
init_required_tile_reader("Satellite high-res", &cli.satellite_highres_tiles).await?;
|
init_required_tile_reader("Satellite high-res", &cli.satellite_highres_tiles).await?;
|
||||||
|
|
|
||||||
|
|
@ -796,9 +796,7 @@ pub async fn get_export(
|
||||||
group.summary.merge_from(agg);
|
group.summary.merge_from(agg);
|
||||||
}
|
}
|
||||||
for group in by_outcode.values_mut() {
|
for group in by_outcode.values_mut() {
|
||||||
group
|
group.members.sort_by(|&a, &b| {
|
||||||
.members
|
|
||||||
.sort_by(|&a, &b| {
|
|
||||||
postcode_data.postcodes[postcode_aggs[a].0]
|
postcode_data.postcodes[postcode_aggs[a].0]
|
||||||
.cmp(&postcode_data.postcodes[postcode_aggs[b].0])
|
.cmp(&postcode_data.postcodes[postcode_aggs[b].0])
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue