-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOB-9081: Written automated unit tests for different field types and … (
#436) * MOB-9081: Written automated unit tests for different field types and comparator types * made criterias to be re-usable
- Loading branch information
1 parent
904f602
commit 0218166
Showing
2 changed files
with
781 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}; |
Oops, something went wrong.