From 5467dc62cd97c7d6c6cf568633553030bfe5f721 Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 15 Dec 2020 15:15:41 +0100 Subject: [PATCH] extra case sensitivity tests --- spec/search/search.spec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/search/search.spec.js b/spec/search/search.spec.js index 7aa9806f8..b95966b8c 100644 --- a/spec/search/search.spec.js +++ b/spec/search/search.spec.js @@ -113,6 +113,15 @@ describe("Search", () => { let searchResults = searchService.findNotesWithQuery('#capital=Vienna', searchContext); expect(searchResults.length).toEqual(1); expect(findNoteByTitle(searchResults, "Austria")).toBeTruthy(); + + // case sensitivity: + searchResults = searchService.findNotesWithQuery('#CAPITAL=VIENNA', searchContext); + expect(searchResults.length).toEqual(1); + expect(findNoteByTitle(searchResults, "Austria")).toBeTruthy(); + + searchResults = searchService.findNotesWithQuery('#caPItal=vienNa', searchContext); + expect(searchResults.length).toEqual(1); + expect(findNoteByTitle(searchResults, "Austria")).toBeTruthy(); }); it("label comparison with full syntax", () => { @@ -473,13 +482,16 @@ describe("Search", () => { } test("type", "text", 7); + test("TYPE", "TEXT", 7); test("type", "code", 0); test("mime", "text/html", 6); test("mime", "application/json", 0); test("isProtected", "false", 7); + test("isProtected", "FALSE", 7); test("isProtected", "true", 0); + test("isProtected", "TRUE", 0); test("dateCreated", "'2020-05-14 12:11:42.001+0200'", 1); test("dateCreated", "wrong", 0);