X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/80af819472296d1164d20772ff4f8db2afced1ed..eed669c677633190b4a440346d26c8a0ce691dc4:/test/search.js diff --git a/test/search.js b/test/search.js index e205b0c..628edaa 100644 --- a/test/search.js +++ b/test/search.js @@ -111,6 +111,18 @@ describe('Search Page', function () { assert.equal((await page.$$('#map')).length, 1); }); + it('should default to dedupe=1', async function () { + const checkbox_checked = await page.$eval('#option_dedupe', el => el.checked); + assert.equal(checkbox_checked, true); + + const links_href = await page.$$eval('#api-request a', links => links.map(l => l.href)); + let api_request_url = new URL(links_href[0]); + let debug_url = new URL(links_href[1]); + + assert.deepStrictEqual(api_request_url.searchParams.has('dedupe'), false); + assert.deepStrictEqual(debug_url.searchParams.has('dedupe'), false); + }); + it('should have polygon and marker in map and minimap', async function () { assert.strictEqual((await page.$$('#map .leaflet-overlay-pane path')).length, 4); });