Fix OSM data refreshes not immediately rendering
CI / Test (pull_request) Failing after 8s
CI / Lint (pull_request) Failing after 12s

This commit is contained in:
2026-08-19 11:01:42 -06:00
parent 61242420d1
commit 1de276fcc8
5 changed files with 121 additions and 10 deletions
+7 -1
View File
@@ -15,8 +15,10 @@ module('Unit | Service | storage', function (hooks) {
let service = this.owner.lookup('service:storage');
// Stub OSM Service
let capturedOptions;
class OsmStub extends Service {
async fetchOsmObject(id, type) {
async fetchOsmObject(id, type, options) {
capturedOptions = options;
return {
osmId: id,
osmType: type,
@@ -49,6 +51,10 @@ module('Unit | Service | storage', function (hooks) {
assert.ok(updatePlaceCalled, 'updatePlace should be called');
assert.strictEqual(result.lat, 52.5201, 'Latitude updated');
assert.ok(
capturedOptions?.forceFresh,
'refreshPlace fetches fresh OSM data (forceFresh: true)'
);
});
test('refreshPlace ignores tiny coordinate drift', async function (assert) {