All files / src/Fake FakeAnalyticsEvents.ts

100% Statements 6/6
50% Branches 2/4
100% Functions 2/2
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55    3x 1x                                               3x 1x                                                    
import { IClickEvent, ISearchEvent } from "coveo-search-ui";
 
export function createFakeSearchEvent(Itoken: string = "foo"): ISearchEvent {
  return {
    actionCause: token + "actionCause",
    actionType: token + "actionType",
    device: token + "device",
    mobile: false,
    originLevel1: token + "originLevel1",
    originLevel2: token + "originLevel2",
    originContext: "context",
    language: token + "language",
    responseTime: 0,
    searchQueryUid: token + "searchQueryUid",
    queryPipeline: token + "queryPipeline",
    splitTestRunName: token + "splitTestRunName",
    splitTestRunVersion: token + "splitTestRunVersion",
    queryText: token + "queryText",
    numberOfResults: 0,
    resultsPerPage: 0,
    pageNumber: 0,
    advancedQuery: token + "advancedQuery",
    didYouMean: false,
    contextual: false
  };
}
 
export function createFakeClickEvent(Itoken: string = "foo"): IClickEvent {
  return {
    actionCause: token + "actionCause",
    actionType: token + "actionType",
    device: token + "device",
    mobile: false,
    originLevel1: token + "originLevel1",
    originLevel2: token + "originLevel2",
    originContext: "context",
    language: token + "language",
    responseTime: 0,
    searchQueryUid: token + "searchQueryUid",
    queryPipeline: token + "queryPipeline",
    splitTestRunName: token + "splitTestRunName",
    splitTestRunVersion: token + "splitTestRunVersion",
    documentUri: token + "documentUri",
    documentUriHash: token + "documentUriHash",
    documentUrl: token + "documentUrl",
    documentTitle: token + "documentTitle",
    documentCategory: token + "documentCategory",
    collectionName: token + "collectionName",
    sourceName: token + "sourceName",
    documentPosition: 0,
    viewMethod: token + "viewMethod",
    rankingModifier: token + "rankingModifier"
  };
}