Fix all broken CIs (#7439)
Fix all the broken CIs :p This includes an ongoing effort to simplify test maintenance by having 1 unique source of truth about metadata and data mocks (that will later be generated from a unique source of seeds: dev = demo = test) Regressions: - Unit line coverage: 60 > 55 - Storybook Pages branch coverage: 40 > 35 We will need to write tests to increase those coverage - RelationFieldDisplay perf: 0.2ms to 0.22ms > We might have a regression here - Removed perf story about RawJSON > We will need to re-add it
This commit is contained in:
committed by
Charles Bochet
parent
bd305c8432
commit
d8c4af9279
@ -11,7 +11,6 @@ import {
|
||||
getCompanyDuplicateMock,
|
||||
} from '~/testing/mock-data/companies';
|
||||
import { mockedClientConfig } from '~/testing/mock-data/config';
|
||||
import { mockedObjectMetadataItemsQueryResult } from '~/testing/mock-data/metadata';
|
||||
import { mockedNotes } from '~/testing/mock-data/notes';
|
||||
import { getPeopleMock } from '~/testing/mock-data/people';
|
||||
import { mockedRemoteTables } from '~/testing/mock-data/remote-tables';
|
||||
@ -19,6 +18,7 @@ import { mockedUserData } from '~/testing/mock-data/users';
|
||||
import { mockedViewsData } from '~/testing/mock-data/views';
|
||||
import { mockWorkspaceMembers } from '~/testing/mock-data/workspace-members';
|
||||
|
||||
import { mockedStandardObjectMetadataQueryResult } from '~/testing/mock-data/generated/mock-metadata-query-result';
|
||||
import { mockedTasks } from '~/testing/mock-data/tasks';
|
||||
import { mockedRemoteServers } from './mock-data/remote-servers';
|
||||
import { mockedViewFieldsData } from './mock-data/view-fields';
|
||||
@ -58,7 +58,7 @@ export const graphqlMocks = {
|
||||
getOperationName(FIND_MANY_OBJECT_METADATA_ITEMS) ?? '',
|
||||
() => {
|
||||
return HttpResponse.json({
|
||||
data: mockedObjectMetadataItemsQueryResult,
|
||||
data: mockedStandardObjectMetadataQueryResult,
|
||||
});
|
||||
},
|
||||
),
|
||||
@ -297,7 +297,7 @@ export const graphqlMocks = {
|
||||
graphql.query('FindManyTasks', () => {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
activities: {
|
||||
tasks: {
|
||||
edges: mockedTasks.map(({ taskTargets, ...rest }) => ({
|
||||
node: {
|
||||
...rest,
|
||||
@ -320,6 +320,26 @@ export const graphqlMocks = {
|
||||
},
|
||||
});
|
||||
}),
|
||||
graphql.query('FindManyTaskTargets', () => {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
taskTargets: {
|
||||
edges: mockedTasks.flatMap((task) =>
|
||||
task.taskTargets.map((target) => ({
|
||||
node: target,
|
||||
cursor: null,
|
||||
})),
|
||||
),
|
||||
pageInfo: {
|
||||
hasNextPage: false,
|
||||
hasPreviousPage: false,
|
||||
startCursor: null,
|
||||
endCursor: null,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
}),
|
||||
graphql.query('FindManyFavorites', () => {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user