Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOB-9081: Written automated unit tests for different field types and … #436

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading