From e250669df71e37c421b2273fd959476b2c15b907 Mon Sep 17 00:00:00 2001 From: mtmail Date: Tue, 20 Apr 2021 00:59:00 +0200 Subject: [PATCH] testcase that search result displays API and debug link (#134) --- test/search.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/search.js b/test/search.js index 6d3420b..c6e6059 100644 --- a/test/search.js +++ b/test/search.js @@ -36,6 +36,11 @@ describe('Search Page', function () { assert.equal(await page.title(), 'Result for City of London | Nominatim Demo'); }); + it('should display the API request and debug URL', async function () { + let link_titles = await page.$$eval('#api-request a', links => links.map(l => l.innerHTML)); + assert.deepEqual(link_titles, ['API request', 'debug output']); + }); + it('should display a map', async function () { await page.waitForSelector('#map'); assert.equal((await page.$$('#map')).length, 1); -- 2.39.5