Add tests for modules/people, modules/pipeline, modules/search and modules/settings (#3395)
Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
This commit is contained in:
@ -0,0 +1,190 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const query = gql`
|
||||
query FindManyPeople(
|
||||
$filter: PersonFilterInput
|
||||
$orderBy: PersonOrderByInput
|
||||
$lastCursor: String
|
||||
$limit: Float = 30
|
||||
) {
|
||||
people(
|
||||
filter: $filter
|
||||
orderBy: $orderBy
|
||||
first: $limit
|
||||
after: $lastCursor
|
||||
) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
opportunities {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
personId
|
||||
pointOfContactId
|
||||
updatedAt
|
||||
companyId
|
||||
pipelineStepId
|
||||
probability
|
||||
closeDate
|
||||
amount {
|
||||
amountMicros
|
||||
currencyCode
|
||||
}
|
||||
id
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
}
|
||||
xLink {
|
||||
label
|
||||
url
|
||||
}
|
||||
id
|
||||
pointOfContactForOpportunities {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
personId
|
||||
pointOfContactId
|
||||
updatedAt
|
||||
companyId
|
||||
pipelineStepId
|
||||
probability
|
||||
closeDate
|
||||
amount {
|
||||
amountMicros
|
||||
currencyCode
|
||||
}
|
||||
id
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
}
|
||||
createdAt
|
||||
company {
|
||||
id
|
||||
xLink {
|
||||
label
|
||||
url
|
||||
}
|
||||
linkedinLink {
|
||||
label
|
||||
url
|
||||
}
|
||||
domainName
|
||||
annualRecurringRevenue {
|
||||
amountMicros
|
||||
currencyCode
|
||||
}
|
||||
createdAt
|
||||
address
|
||||
updatedAt
|
||||
name
|
||||
accountOwnerId
|
||||
employees
|
||||
id
|
||||
idealCustomerProfile
|
||||
}
|
||||
city
|
||||
email
|
||||
activityTargets {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
updatedAt
|
||||
createdAt
|
||||
personId
|
||||
activityId
|
||||
companyId
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
jobTitle
|
||||
favorites {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
id
|
||||
companyId
|
||||
createdAt
|
||||
personId
|
||||
position
|
||||
workspaceMemberId
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
}
|
||||
attachments {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
updatedAt
|
||||
createdAt
|
||||
name
|
||||
personId
|
||||
activityId
|
||||
companyId
|
||||
id
|
||||
authorId
|
||||
type
|
||||
fullPath
|
||||
}
|
||||
}
|
||||
}
|
||||
name {
|
||||
firstName
|
||||
lastName
|
||||
}
|
||||
phone
|
||||
linkedinLink {
|
||||
label
|
||||
url
|
||||
}
|
||||
updatedAt
|
||||
avatarUrl
|
||||
companyId
|
||||
}
|
||||
cursor
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
startCursor
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const variables = {
|
||||
entitiesToSelect: {
|
||||
limit: 10,
|
||||
filter: {
|
||||
and: [
|
||||
{ and: [{ or: [{ name: { ilike: '%Entity%' } }] }] },
|
||||
{ not: { id: { in: ['1', '2'] } } },
|
||||
],
|
||||
},
|
||||
orderBy: { name: 'AscNullsLast' },
|
||||
},
|
||||
filteredSelectedEntities: {
|
||||
limit: 60,
|
||||
filter: {
|
||||
and: [
|
||||
{ and: [{ or: [{ name: { ilike: '%Entity%' } }] }] },
|
||||
{ id: { in: ['1'] } },
|
||||
],
|
||||
},
|
||||
orderBy: { name: 'AscNullsLast' },
|
||||
},
|
||||
selectedEntities: {
|
||||
limit: 60,
|
||||
filter: { id: { in: ['1'] } },
|
||||
orderBy: { name: 'AscNullsLast' },
|
||||
},
|
||||
};
|
||||
|
||||
export const responseData = {
|
||||
edges: [],
|
||||
};
|
||||
Reference in New Issue
Block a user