diff options
author | Steve Thomas <steventh@amdocs.com> | 2018-03-29 14:41:43 -0400 |
---|---|---|
committer | Steven Thomas <steve.thomas@amdocs.com> | 2018-03-29 14:57:35 -0400 |
commit | 0b2b11bad1457e7f388ab2a99af6ebf231e862e3 (patch) | |
tree | 8ef541c5b172893ca9b952cf251a7a78668ab6f1 /test/tierSupport/autoCompleteSearchBar/autoCompleteSearchBarTestConstants.js | |
parent | 47b85e9b95e0a0a3570f0cea4d3ee4645c911a8b (diff) |
increasing test coverage to 10%
Issue-ID: AAI-980
Change-Id: Idb816df11fa14b5668349f24bac1aafd7235e00a
Signed-off-by: Steven Thomas <steve.thomas@amdocs.com>
Diffstat (limited to 'test/tierSupport/autoCompleteSearchBar/autoCompleteSearchBarTestConstants.js')
-rw-r--r-- | test/tierSupport/autoCompleteSearchBar/autoCompleteSearchBarTestConstants.js | 231 |
1 files changed, 0 insertions, 231 deletions
diff --git a/test/tierSupport/autoCompleteSearchBar/autoCompleteSearchBarTestConstants.js b/test/tierSupport/autoCompleteSearchBar/autoCompleteSearchBarTestConstants.js deleted file mode 100644 index 57f7af8..0000000 --- a/test/tierSupport/autoCompleteSearchBar/autoCompleteSearchBarTestConstants.js +++ /dev/null @@ -1,231 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * org.onap.aai - * ================================================================================ - * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017-2018 Amdocs - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ -const validResponseJsonForRequestFromFetchWithHitsType1 = { - "took": 5, - "timed_out": false, - "_shards": { - "total": 5, - "successful": 5, - "failed": 0 - }, - "hits": { - "total": 9376, - "max_score": 3.3899312, - "hits": [ - { - "_index": "entitysearchindex-localhost", - "_type": "aaiEntities", - "_id": "4785c7ec8ae11be12ca742248713346ea03a473ef65aa84bbea102c67fa5d", - "_score": 3.3899312, - "_source": { - "entityType": "service-instance", - "edgeTagQueryEntityFieldName": "service-instance.service-instance-id", - "edgeTagQueryEntityFieldValue": "a162a2a2-ea7e-4e94-afc3-e9d064a3c2a1", - "searchTagIDs": "0", - "searchTags": "service-instance-id=a162a2a2-ea7e-4e94-afc3-e9d064a3c2a1" - } - }, - { - "_index": "entitysearchindex-localhost", - "_type": "aaiEntities", - "_id": "8e9baedcbf1cb2f9439f6b8b5eeaf0b8fa364086c8ef5ee6edcf6f5da114", - "_score": 3.1589103, - "_source": { - "entityType": "service-instance", - "edgeTagQueryEntityFieldName": "service-instance.service-instance-id", - "edgeTagQueryEntityFieldValue": "d1f3c3be-7a7f-42ea-a9ac-ca20af1588b8", - "searchTagIDs": "0", - "searchTags": "service-instance-id=d1f3c3be-7a7f-42ea-a9ac-ca20af1588b8" - } - }, - { - "_index": "entitysearchindex-localhost", - "_type": "aaiEntities", - "_id": "dd4bdbf810f5c1bc7be7d91f241b0221d75617a45f574f2ed6207e9c8ceb9e", - "_score": 3.147036, - "_source": { - "entityType": "service-instance", - "edgeTagQueryEntityFieldName": "service-instance.service-instance-id", - "edgeTagQueryEntityFieldValue": "6c27a7cb-d8e1-45a8-aa12-61a694201cca", - "searchTagIDs": "0", - "searchTags": "service-instance-id=6c27a7cb-d8e1-45a8-aa12-61a694201cca" - } - }, - { - "_index": "entitysearchindex-localhost2", - "_type": "aaiEntities", - "_id": "4785c7ec8ae11be12ca742248713346ea03a473ef65aa84bbea102c67fa5d", - "_score": 3.3899312, - "_source": { - "entityType": "service-instance", - "edgeTagQueryEntityFieldName": "service-instance.service-instance-id", - "edgeTagQueryEntityFieldValue": "a162a2a2-ea7e-4e94-afc3-e9d064a3c2a1", - "searchTagIDs": "0", - "searchTags": "service-instance-id=a162a2a2-ea7e-4e94-afc3-e9d064a3c2a1" - } - }, - { - "_index": "entitysearchindex-localhost2", - "_type": "aaiEntities", - "_id": "8e9baedcbf1cb2f9439f6b8b5eeaf0b8fa364086c8ef5ee6edcf6f5da114", - "_score": 3.1589103, - "_source": { - "entityType": "service-instance", - "edgeTagQueryEntityFieldName": "service-instance.service-instance-id", - "edgeTagQueryEntityFieldValue": "d1f3c3be-7a7f-42ea-a9ac-ca20af1588b8", - "searchTagIDs": "0", - "searchTags": "service-instance-id=d1f3c3be-7a7f-42ea-a9ac-ca20af1588b8" - } - }, - { - "_index": "entitysearchindex-localhost2", - "_type": "aaiEntities", - "_id": "dd4bdbf810f5c1bc7be7d91f241b0221d75617a45f574f2ed6207e9c8ceb9e", - "_score": 3.147036, - "_source": { - "entityType": "service-instance", - "edgeTagQueryEntityFieldName": "service-instance.service-instance-id", - "edgeTagQueryEntityFieldValue": "6c27a7cb-d8e1-45a8-aa12-61a694201cca", - "searchTagIDs": "0", - "searchTags": "service-instance-id=6c27a7cb-d8e1-45a8-aa12-61a694201cca" - } - } - ] - } -}; - -const validResponseJsonForRequestFromFetchWithHitsType2 = { - "took": 5, - "timed_out": false, - "_shards": { - "total": 5, - "successful": 5, - "failed": 0 - }, - "hits": { - "total": 9376, - "max_score": 3.3899312, - "hits": [ - { - "_index": "entitysearchindex-localhost", - "_type": "aaiEntities", - "_id": "4785c7ec8ae11be12ca742248713346ea03a473ef65aa84bbea102c67fa5d", - "_score": 3.3899312, - "_source": { - "entityType": "service-instance", - "edgeTagQueryEntityFieldName": "service-instance.service-instance-id", - "entityPrimaryKeyValue": "a162a2a2-ea7e-4e94-afc3-e9d064a3c2a1", - "searchTagIDs": "0", - "searchTags": "hostname-id=a162a2a2-ea7e-4e94-afc3-e9d064a3c2a1" - } - }, - { - "_index": "entitysearchindex-localhost", - "_type": "aaiEntities", - "_id": "8e9baedcbf1cb2f9439f6b8b5eeaf0b8fa364086c8ef5ee6edcf6f5da114", - "_score": 3.1589103, - "_source": { - "entityType": "service-instance", - "edgeTagQueryEntityFieldName": "service-instance.service-instance-id", - "edgeTagQueryEntityFieldValue": "d1f3c3be-7a7f-42ea-a9ac-ca20af1588b8", - "searchTagIDs": "0", - "searchTags": "hostname-id=d1f3c3be-7a7f-42ea-a9ac-ca20af1588b8" - } - }, - { - "_index": "entitysearchindex-localhost", - "_type": "aaiEntities", - "_id": "dd4bdbf810f5c1bc7be7d91f241b0221d75617a45f574f2ed6207e9c8ceb9e", - "_score": 3.147036, - "_source": { - "entityType": "service-instance", - "edgeTagQueryEntityFieldName": "service-instance.service-instance-id", - "edgeTagQueryEntityFieldValue": "6c27a7cb-d8e1-45a8-aa12-61a694201cca", - "searchTagIDs": "0", - "searchTags": "hostname-id=6c27a7cb-d8e1-45a8-aa12-61a694201cca" - } - } - ] - } -}; - -const validResponseJsonForRequestFromFetchWithOutHits = { - "took": 5, - "timed_out": false, - "_shards": { - "total": 5, - "successful": 5, - "failed": 0 - }, - "hits": { - "total": 0, - "max_score": 3.3899312, - "hits": [] - } -}; - -const networkError = { - "error": "Network Error" -}; - -const validResponseJsonForNodeSearchFromFetchWithHits = { - "graphMeta":{}, - "nodes" : [ { - "id" : "service-instance.PRUCPEHOST0627002", - "itemType" : "service-instance", - "itemNameKey" : "service-instance.PRUCPEHOST0627002", - "itemNameValue" : "PRUCPEHOST0627002", - "itemProperties" : { - "resource-version" : "1467233099", - "service-instance-id" : "PRUCPEHOST0627002" - }, - "nodeMeta" : { - "className" : "selectedSearchedNodeClass", - "nodeDebug" : null, - "selfLinkResponseTimeInMs" : 131, - "relationshipNode" : false, - "searchTarget" : true, - "enrichableNode" : false - } - } ] -}; - -const inValidResponseJsonForNodeSearchFromFetchWithHits = { - "graphMeta":{}, - "nodes" : [] -}; - -const nodeSearchKeyword = 'service-instance-id=a162a2a2-ea7e-4e94-afc3-e9d064a3c2a1'; -const nodeSearchKeywordWithOutEqualSign = 'a162a2a2-ea7e-4e94-afc3-e9d064a3c2a1'; -const multipleNodeSearchKeyword = 'service-instance-id=a162a2a2-ea7e-4e94-afc3-e9d064a3c2a1, service-instance-id=a162a2a2-ea7e-4e94-afc3-e9d064a3c2a1'; -const mockRequestTimeOut = 1; -export default{ - validResponseJsonForRequestFromFetchWithHitsType1: validResponseJsonForRequestFromFetchWithHitsType1, - validResponseJsonForRequestFromFetchWithHitsType2: validResponseJsonForRequestFromFetchWithHitsType2, - validResponseJsonForRequestFromFetchWithOutHits: validResponseJsonForRequestFromFetchWithOutHits, - networkError: networkError, - validResponseJsonForNodeSearchFromFetchWithHits: validResponseJsonForNodeSearchFromFetchWithHits, - inValidResponseJsonForNodeSearchFromFetchWithHits: inValidResponseJsonForNodeSearchFromFetchWithHits, - nodeSearchKeyword: nodeSearchKeyword, - nodeSearchKeywordWithOutEqualSign: nodeSearchKeywordWithOutEqualSign, - multipleNodeSearchKeyword: multipleNodeSearchKeyword, - mockRequestTimeOut: mockRequestTimeOut -}; |