Skip to content

Commit

Permalink
made criterias to be re-usable
Browse files Browse the repository at this point in the history
  • Loading branch information
darshan-iterable committed Aug 29, 2024
1 parent a270ab4 commit a6e1c70
Show file tree
Hide file tree
Showing 2 changed files with 365 additions and 672 deletions.
342 changes: 342 additions & 0 deletions src/anonymousUserTracking/tests/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,342 @@
export const DATA_TYPE_COMPARATOR_EQUALS = {
count: 1,
criterias: [
{
criteriaId: '285',
name: 'Criteria_EventTimeStamp_3_Long',
createdAt: 1722497422151,
updatedAt: 1722500235276,
searchQuery: {
combinator: 'And',
searchQueries: [
{
combinator: 'And',
searchQueries: [
{
dataType: 'user',
searchCombo: {
combinator: 'And',
searchQueries: [
{
dataType: 'user',
field: 'eventTimeStamp',
comparatorType: 'Equals',
value: '3',
fieldType: 'long'
},
{
dataType: 'user',
field: 'savings',
comparatorType: 'Equals',
value: '19.99',
fieldType: 'double'
},
{
dataType: 'user',
field: 'likes_boba',
comparatorType: 'Equals',
value: 'true',
fieldType: 'boolean'
},
{
dataType: 'user',
field: 'country',
comparatorType: 'Equals',
value: 'Chaina',
fieldType: 'String'
}
]
}
}
]
}
]
}
}
]
};

export const DATA_TYPE_COMPARATOR_DOES_NOT_EQUAL = {
count: 1,
criterias: [
{
criteriaId: '285',
name: 'Criteria_EventTimeStamp_3_Long',
createdAt: 1722497422151,
updatedAt: 1722500235276,
searchQuery: {
combinator: 'And',
searchQueries: [
{
combinator: 'And',
searchQueries: [
{
dataType: 'user',
searchCombo: {
combinator: 'And',
searchQueries: [
{
dataType: 'user',
field: 'eventTimeStamp',
comparatorType: 'DoesNotEqual',
value: '3',
fieldType: 'long'
},
{
dataType: 'user',
field: 'savings',
comparatorType: 'DoesNotEqual',
value: '19.99',
fieldType: 'double'
},
{
dataType: 'user',
field: 'likes_boba',
comparatorType: 'DoesNotEqual',
value: 'true',
fieldType: 'boolean'
}
]
}
}
]
}
]
}
}
]
};

export const DATA_TYPE_COMPARATOR_LESS_THAN = {
count: 1,
criterias: [
{
criteriaId: '289',
name: 'Criteria_EventTimeStamp_3_Long',
createdAt: 1722497422151,
updatedAt: 1722500235276,
searchQuery: {
combinator: 'And',
searchQueries: [
{
combinator: 'And',
searchQueries: [
{
dataType: 'user',
searchCombo: {
combinator: 'And',
searchQueries: [
{
dataType: 'user',
field: 'eventTimeStamp',
comparatorType: 'LessThan',
value: '15',
fieldType: 'long'
},
{
dataType: 'user',
field: 'savings',
comparatorType: 'LessThan',
value: '15',
fieldType: 'double'
}
]
}
}
]
}
]
}
}
]
};

export const DATA_TYPE_COMPARATOR_LESS_THAN_OR_EQUAL_TO = {
count: 1,
criterias: [
{
criteriaId: '290',
name: 'Criteria_EventTimeStamp_3_Long',
createdAt: 1722497422151,
updatedAt: 1722500235276,
searchQuery: {
combinator: 'And',
searchQueries: [
{
combinator: 'And',
searchQueries: [
{
dataType: 'user',
searchCombo: {
combinator: 'And',
searchQueries: [
{
dataType: 'user',
field: 'eventTimeStamp',
comparatorType: 'LessThanOrEqualTo',
value: '17',
fieldType: 'long'
},
{
dataType: 'user',
field: 'savings',
comparatorType: 'LessThanOrEqualTo',
value: '17',
fieldType: 'double'
}
]
}
}
]
}
]
}
}
]
};

export const DATA_TYPE_COMPARATOR_GREATER_THAN = {
count: 1,
criterias: [
{
criteriaId: '290',
name: 'Criteria_EventTimeStamp_3_Long',
createdAt: 1722497422151,
updatedAt: 1722500235276,
searchQuery: {
combinator: 'And',
searchQueries: [
{
combinator: 'And',
searchQueries: [
{
dataType: 'user',
searchCombo: {
combinator: 'And',
searchQueries: [
{
dataType: 'user',
field: 'eventTimeStamp',
comparatorType: 'GreaterThan',
value: '50',
fieldType: 'long'
},
{
dataType: 'user',
field: 'savings',
comparatorType: 'GreaterThan',
value: '55',
fieldType: 'double'
}
]
}
}
]
}
]
}
}
]
};

export const DATA_TYPE_COMPARATOR_GREATER_THAN_OR_EQUAL_TO = {
count: 1,
criterias: [
{
criteriaId: '291',
name: 'Criteria_EventTimeStamp_3_Long',
createdAt: 1722497422151,
updatedAt: 1722500235276,
searchQuery: {
combinator: 'And',
searchQueries: [
{
combinator: 'And',
searchQueries: [
{
dataType: 'user',
searchCombo: {
combinator: 'And',
searchQueries: [
{
dataType: 'user',
field: 'eventTimeStamp',
comparatorType: 'GreaterThanOrEqualTo',
value: '20',
fieldType: 'long'
},
{
dataType: 'user',
field: 'savings',
comparatorType: 'GreaterThanOrEqualTo',
value: '20',
fieldType: 'double'
}
]
}
}
]
}
]
}
}
]
};

export const DATA_TYPE_COMPARATOR_IS_SET = {
count: 1,
criterias: [
{
criteriaId: '285',
name: 'Criteria_EventTimeStamp_3_Long',
createdAt: 1722497422151,
updatedAt: 1722500235276,
searchQuery: {
combinator: 'And',
searchQueries: [
{
combinator: 'And',
searchQueries: [
{
dataType: 'user',
searchCombo: {
combinator: 'And',
searchQueries: [
{
dataType: 'user',
field: 'eventTimeStamp',
comparatorType: 'IsSet',
value: '',
fieldType: 'long'
},
{
dataType: 'user',
field: 'savings',
comparatorType: 'IsSet',
value: '',
fieldType: 'double'
},
{
dataType: 'user',
field: 'saved_cars',
comparatorType: 'IsSet',
value: '',
fieldType: 'double'
},
{
dataType: 'user',
field: 'country',
comparatorType: 'IsSet',
value: '',
fieldType: 'double'
}
]
}
}
]
}
]
}
}
]
};
Loading

0 comments on commit a6e1c70

Please sign in to comment.