From a5aaf393d8aca71f0c224ee85ed818725550acf7 Mon Sep 17 00:00:00 2001 From: Yash Srivastava <52625656+darkshredder@users.noreply.github.com> Date: Thu, 29 Apr 2021 16:31:59 +0530 Subject: [PATCH] Feat: Ignore case senstivity to osm type, details page (#144) --- src/components/SearchSectionDetails.svelte | 4 ++-- test/details.js | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/SearchSectionDetails.svelte b/src/components/SearchSectionDetails.svelte index 8029fb3..cd5faac 100644 --- a/src/components/SearchSectionDetails.svelte +++ b/src/components/SearchSectionDetails.svelte @@ -27,12 +27,12 @@
- OSM type+id (N123, W123, R123), + OSM type+id (N123, n123, W123, w123, R123, r123), Place id (1234) or URL (https://openstreetmap.org/way/123) diff --git a/test/details.js b/test/details.js index ba1c154..5baf402 100644 --- a/test/details.js +++ b/test/details.js @@ -68,5 +68,15 @@ describe('Details Page', function () { current_url = new URL(await page.url()); assert.strictEqual(current_url.searchParams.get('hierarchy'), '1'); }); + + it('should have case-insenstive input and can navigate to other details', async function () { + let input_field = await page.$('input[type=edit]'); + await input_field.click({ clickCount: 3 }); + await input_field.type('w375257537'); + await page.click('button[type=submit]'); + + await page.waitForSelector('a[href="https://www.openstreetmap.org/way/375257537"]'); + assert.ok((await page.$eval('.container h1', el => el.textContent)).includes('Taj Mahal')); + }); }); }); -- 2.39.5