mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 12:02:10 +03:00
Improve flaky storybook test (#8515)
I don't think that will solve the flaky test but at least it will cleanup the error message to avoid confusion
This commit is contained in:
parent
bd18eb8b42
commit
34a3a66451
@ -35,9 +35,7 @@ export const Default: Story = {
|
||||
|
||||
await canvas.findByText('Search');
|
||||
await canvas.findByText('Settings');
|
||||
await canvas.findByText('Tasks');
|
||||
await canvas.findByText('People');
|
||||
await canvas.findByText('Opportunities');
|
||||
await canvas.findByText('Rockets');
|
||||
await canvas.findByText('Linkedin');
|
||||
await canvas.findByText('All companies');
|
||||
},
|
||||
};
|
||||
|
@ -11,8 +11,19 @@ export type Company = {
|
||||
__typename?: 'Links';
|
||||
primaryLinkUrl: string;
|
||||
primaryLinkLabel: string;
|
||||
secondaryLinks: never[] | [];
|
||||
};
|
||||
address: string;
|
||||
address: {
|
||||
__typename?: 'Address';
|
||||
addressLine1: string;
|
||||
addressLine2: string;
|
||||
addressCity: string;
|
||||
addressState: string;
|
||||
addressPostcode: string;
|
||||
addressCountry: string;
|
||||
addressLat: number | null;
|
||||
addressLng: number | null;
|
||||
};
|
||||
accountOwnerId?: string | null;
|
||||
position?: number;
|
||||
linkedinLink: {
|
||||
|
@ -26,7 +26,7 @@ export const responseData = {
|
||||
xLink: {
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdAt: '',
|
||||
city: '',
|
||||
@ -43,7 +43,7 @@ export const responseData = {
|
||||
linkedinLink: {
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
updatedAt: '',
|
||||
avatarUrl: '',
|
||||
|
@ -16,7 +16,7 @@ export const responseData = {
|
||||
xLink: {
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
pointOfContactForOpportunities: {
|
||||
edges: [],
|
||||
@ -48,7 +48,7 @@ export const responseData = {
|
||||
linkedinLink: {
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
updatedAt: '',
|
||||
avatarUrl: '',
|
||||
|
@ -14,7 +14,7 @@ const basePerson = {
|
||||
xLink: {
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdAt: '',
|
||||
city: '',
|
||||
@ -26,7 +26,7 @@ const basePerson = {
|
||||
linkedinLink: {
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
updatedAt: '',
|
||||
avatarUrl: '',
|
||||
|
@ -128,7 +128,7 @@ export const buildRecordFromImportedStructuredRow = (
|
||||
primaryLinkUrl: castToString(
|
||||
importedStructuredRow[`${primaryLinkUrlLabel} (${field.name})`],
|
||||
),
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
} satisfies FieldLinksValue;
|
||||
}
|
||||
break;
|
||||
|
@ -15,7 +15,7 @@ export const generateEmptyFieldValue = (
|
||||
return { primaryEmail: '', additionalEmails: null };
|
||||
}
|
||||
case FieldMetadataType.Links: {
|
||||
return { primaryLinkUrl: '', primaryLinkLabel: '', secondaryLinks: null };
|
||||
return { primaryLinkUrl: '', primaryLinkLabel: '', secondaryLinks: [] };
|
||||
}
|
||||
case FieldMetadataType.FullName: {
|
||||
return {
|
||||
|
@ -45,7 +45,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
|
||||
xLink: {
|
||||
primaryLinkLabel: 'asd',
|
||||
primaryLinkUrl: 'asd.com',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
__typename: 'Links',
|
||||
},
|
||||
name: {
|
||||
@ -58,7 +58,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
|
||||
linkedinLink: {
|
||||
primaryLinkLabel: 'asd',
|
||||
primaryLinkUrl: 'asd.com',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
__typename: 'Links',
|
||||
},
|
||||
},
|
||||
@ -85,7 +85,7 @@ export const SIGN_IN_BACKGROUND_MOCK_COMPANIES = [
|
||||
xLink: {
|
||||
primaryLinkLabel: null,
|
||||
primaryLinkUrl: null,
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
__typename: 'Links',
|
||||
},
|
||||
annualRecurringRevenue: {
|
||||
|
@ -32,7 +32,7 @@ export const Default: Story = {
|
||||
play: async ({ canvasElement }) => {
|
||||
const canvas = within(canvasElement);
|
||||
|
||||
await canvas.findByText('Companies', undefined, { timeout: 3000 });
|
||||
await canvas.findAllByText('Companies', undefined, { timeout: 3000 });
|
||||
await canvas.findByText('Linkedin');
|
||||
},
|
||||
};
|
||||
|
@ -11,6 +11,7 @@ import {
|
||||
getCompanyDuplicateMock,
|
||||
} from '~/testing/mock-data/companies';
|
||||
import { mockedClientConfig } from '~/testing/mock-data/config';
|
||||
import { mockedFavoritesData } from '~/testing/mock-data/favorite';
|
||||
import { mockedNotes } from '~/testing/mock-data/notes';
|
||||
import { getPeopleMock } from '~/testing/mock-data/people';
|
||||
import { mockedRemoteTables } from '~/testing/mock-data/remote-tables';
|
||||
@ -212,8 +213,11 @@ export const graphqlMocks = {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
favorites: {
|
||||
edges: [],
|
||||
totalCount: 0,
|
||||
edges: mockedFavoritesData.map((favorite) => ({
|
||||
node: favorite,
|
||||
cursor: null,
|
||||
})),
|
||||
totalCount: mockedFavoritesData.length,
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
@ -449,7 +453,10 @@ export const graphqlMocks = {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
favorites: {
|
||||
edges: [],
|
||||
edges: mockedFavoritesData.map((favorite) => ({
|
||||
node: favorite,
|
||||
cursor: null,
|
||||
})),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
|
@ -17,9 +17,9 @@ export const getEmptyCompanyMock = () => {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: '',
|
||||
address: {},
|
||||
accountOwner: null,
|
||||
createdAt: null,
|
||||
updatedAt: null,
|
||||
@ -60,20 +60,32 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: 'https://linkedin.com',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
__typename: 'Address',
|
||||
addressLine1: '',
|
||||
addressLine2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
position: 1,
|
||||
idealCustomerProfile: true,
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
xLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -115,7 +127,7 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
name: {
|
||||
__typename: 'FullName',
|
||||
@ -163,9 +175,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://facebook.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -177,11 +198,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -202,9 +225,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://qonto.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -216,11 +248,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -241,9 +275,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://microsoft.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -255,11 +298,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -280,9 +325,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://airbnb.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -294,11 +348,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -319,9 +375,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://google.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -333,11 +398,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -358,9 +425,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://netflix.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -372,11 +448,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -397,9 +475,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://libeo.io',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -411,11 +498,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -436,9 +525,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://claap.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -450,11 +548,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -475,9 +575,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://hasura.io',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -489,11 +598,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -514,9 +625,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://wework.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -528,11 +648,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -553,9 +675,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://samsung.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -567,11 +698,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -592,9 +725,18 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://algolia.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
address: {
|
||||
addressStreet1: '',
|
||||
addressStreet2: '',
|
||||
addressCity: '',
|
||||
addressState: '',
|
||||
addressCountry: '',
|
||||
addressPostcode: '',
|
||||
addressLat: null,
|
||||
addressLng: null,
|
||||
},
|
||||
address: '',
|
||||
previousEmployees: null,
|
||||
annualRecurringRevenue: {
|
||||
__typename: 'Currency',
|
||||
@ -606,11 +748,13 @@ export const companiesQueryResult = {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkLabel: '',
|
||||
primaryLinkUrl: '',
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
36
packages/twenty-front/src/testing/mock-data/favorite.ts
Normal file
36
packages/twenty-front/src/testing/mock-data/favorite.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import { companiesQueryResult } from '~/testing/mock-data/companies';
|
||||
import { mockedWorkspaceMemberData } from '~/testing/mock-data/users';
|
||||
|
||||
export const mockedFavoritesData = [
|
||||
{
|
||||
id: '20202020-dede-koko-873b-de4264d89025',
|
||||
createdAt: new Date().toISOString(),
|
||||
updatedAt: new Date().toISOString(),
|
||||
deletedAt: null,
|
||||
position: 0,
|
||||
recordId: null,
|
||||
workflowId: null,
|
||||
workflow: null,
|
||||
workflowRunId: null,
|
||||
workflowRun: null,
|
||||
workflowVersionId: null,
|
||||
workflowVersion: null,
|
||||
workspaceMemberId: mockedWorkspaceMemberData.id,
|
||||
workspaceMember: mockedWorkspaceMemberData,
|
||||
companyId: companiesQueryResult.companies.edges[0].node.id,
|
||||
company: companiesQueryResult.companies.edges[0].node,
|
||||
viewId: null,
|
||||
view: null,
|
||||
taskId: null,
|
||||
task: null,
|
||||
rocketId: null,
|
||||
rocket: null,
|
||||
personId: null,
|
||||
person: null,
|
||||
opportunityId: null,
|
||||
opportunity: null,
|
||||
noteId: null,
|
||||
note: null,
|
||||
__typename: 'Favorite',
|
||||
},
|
||||
];
|
@ -70,7 +70,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -82,7 +82,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -114,13 +114,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://linkedin.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -132,7 +132,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
testSelect: {
|
||||
@ -200,7 +200,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -212,7 +212,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -244,13 +244,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://linkedin.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -262,7 +262,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
testSelect: {
|
||||
@ -330,7 +330,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -342,7 +342,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -374,13 +374,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://linkedin.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -392,7 +392,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -429,7 +429,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -441,7 +441,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -473,13 +473,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://qonto.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -491,7 +491,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -528,7 +528,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -540,7 +540,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -572,13 +572,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://qonto.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -590,7 +590,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -627,7 +627,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -639,7 +639,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -671,13 +671,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://microsoft.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -689,7 +689,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -726,7 +726,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -738,7 +738,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -770,13 +770,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://microsoft.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -788,7 +788,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -825,7 +825,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -837,7 +837,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -869,13 +869,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://microsoft.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -887,7 +887,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -924,7 +924,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -936,7 +936,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -968,13 +968,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://airbnb.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -986,7 +986,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1023,7 +1023,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1035,7 +1035,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -1067,13 +1067,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://airbnb.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1085,7 +1085,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1122,7 +1122,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1134,7 +1134,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -1166,13 +1166,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://airbnb.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1184,7 +1184,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1221,7 +1221,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1233,7 +1233,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -1265,13 +1265,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://google.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1283,7 +1283,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1320,7 +1320,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1332,7 +1332,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -1364,13 +1364,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://google.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1382,7 +1382,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1419,7 +1419,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1431,7 +1431,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -1463,13 +1463,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://google.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1481,7 +1481,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1518,7 +1518,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1530,7 +1530,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -1562,13 +1562,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://google.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1580,7 +1580,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1617,7 +1617,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1629,7 +1629,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
company: {
|
||||
__typename: 'Company',
|
||||
@ -1661,13 +1661,13 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: 'https://google.com',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
linkedinLink: {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
createdBy: {
|
||||
__typename: 'Actor',
|
||||
@ -1679,7 +1679,7 @@ export const peopleQueryResult: { people: RecordGqlConnection } = {
|
||||
__typename: 'Links',
|
||||
primaryLinkUrl: '',
|
||||
primaryLinkLabel: '',
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -56,9 +56,12 @@ rawDataSource
|
||||
]; // See https://supabase.github.io/wrappers/
|
||||
|
||||
for (const wrapper of supabaseWrappers) {
|
||||
if (await checkForeignDataWrapperExists(wrapper)) {
|
||||
continue;
|
||||
}
|
||||
await performQuery(
|
||||
`
|
||||
CREATE FOREIGN DATA WRAPPER IF NOT EXISTS "${wrapper.toLowerCase()}_fdw"
|
||||
CREATE FOREIGN DATA WRAPPER "${wrapper.toLowerCase()}_fdw"
|
||||
HANDLER "${camelToSnakeCase(wrapper)}_fdw_handler"
|
||||
VALIDATOR "${camelToSnakeCase(wrapper)}_fdw_validator";
|
||||
`,
|
||||
@ -71,3 +74,14 @@ rawDataSource
|
||||
.catch((err) => {
|
||||
console.error('Error during Data Source initialization:', err);
|
||||
});
|
||||
|
||||
async function checkForeignDataWrapperExists(
|
||||
wrapperName: string,
|
||||
): Promise<boolean> {
|
||||
const result = await rawDataSource.query(
|
||||
`SELECT 1 FROM pg_foreign_data_wrapper WHERE fdwname = $1`,
|
||||
[wrapperName],
|
||||
);
|
||||
|
||||
return result.length > 0;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ export function generateDefaultValue(
|
||||
return {
|
||||
primaryLinkLabel: "''",
|
||||
primaryLinkUrl: "''",
|
||||
secondaryLinks: null,
|
||||
secondaryLinks: [],
|
||||
};
|
||||
case FieldMetadataType.PHONES:
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user