Add full-text search

Add a search box with a quick results popover, as well full results in
the sidebar on pressing enter.
This commit is contained in:
2026-02-20 12:39:04 +04:00
parent 2734f08608
commit bf12305600
15 changed files with 878 additions and 68 deletions

View File

@@ -0,0 +1,37 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'marco/tests/helpers';
import { render } from '@ember/test-helpers';
import PlaceDetails from 'marco/components/place-details';
module('Integration | Component | place-details', function (hooks) {
setupRenderingTest(hooks);
test('it formats coordinates correctly', async function (assert) {
const place = {
title: 'Test Place',
lat: 52.520006789,
lon: 13.404954123,
description: 'A place for testing.',
};
await render(<template><PlaceDetails @place={{place}} /></template>);
assert.dom('.place-details').exists();
assert.dom('.place-details h3').hasText('Test Place');
// Check for the formatted coordinates link text
// "52.520007, 13.404954" (rounded)
assert.dom('.meta-info a[href*="geo:"]').hasText('52.520007, 13.404954');
});
test('it handles missing coordinates gracefully', async function (assert) {
const place = {
title: 'Place without Coords',
};
await render(<template><PlaceDetails @place={{place}} /></template>);
assert.dom('.place-details h3').hasText('Place without Coords');
assert.dom('.meta-info a[href*="geo:"]').doesNotExist();
});
});