From 1511b9f6ee94b71224518c90a893ac232827adf2 Mon Sep 17 00:00:00 2001 From: Faisal Alquaddoomi Date: Fri, 8 Apr 2022 08:57:24 -0600 Subject: [PATCH] Adds tests for _taxon_map, categories fixes. --- tests/nlp-annotation-categories.feature | 7 +++++++ tests/search-entity-taxonmap.feature | 9 +++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/nlp-annotation-categories.feature create mode 100644 tests/search-entity-taxonmap.feature diff --git a/tests/nlp-annotation-categories.feature b/tests/nlp-annotation-categories.feature new file mode 100644 index 0000000..80158f0 --- /dev/null +++ b/tests/nlp-annotation-categories.feature @@ -0,0 +1,7 @@ +Feature: NLP Annotate Entities returns categories from SciGraph + +## NLP Annotate Entities returns results w/non-empty 'categories' + + Scenario: User requests NLP annotated entities for the string 'males' + Given a path "/nlp/annotate/entities?content=males" + then the JSON should have some JSONPath "spans.[*].token.[*].categories.[*]" containing "string" "anatomical entity" diff --git a/tests/search-entity-taxonmap.feature b/tests/search-entity-taxonmap.feature new file mode 100644 index 0000000..4b216d1 --- /dev/null +++ b/tests/search-entity-taxonmap.feature @@ -0,0 +1,9 @@ +Feature: Search Entity Term returns a _taxon_map key w/taxon IDs + +## Search Entity Term returns a _taxon_map key + + Scenario: User queries for marfan's disease + Given a path "/search/entity/marfan" + then the content should contain "_taxon_map" + then the JSON should have some JSONPath "facet_counts._taxon_map.[*].id" containing "string" "NCBITaxon:9606" + then the JSON should have some JSONPath "facet_counts._taxon_map.[*].label" containing "string" "Homo sapiens"