Try migrating to depot (#9555)
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
const globalCoverage = {
|
||||
branches: 45,
|
||||
statements: 60,
|
||||
lines: 60,
|
||||
functions: 60,
|
||||
branches: 24,
|
||||
statements: 40,
|
||||
lines: 40,
|
||||
functions: 30,
|
||||
exclude: ['src/generated/**/*'],
|
||||
};
|
||||
|
||||
@ -40,4 +40,4 @@ module.exports =
|
||||
? modulesCoverage
|
||||
: storybookStoriesFolders === 'performance'
|
||||
? performanceCoverage
|
||||
: globalCoverage;
|
||||
: globalCoverage;
|
||||
|
||||
@ -36,6 +36,6 @@ export const Default: Story = {
|
||||
await canvas.findByText('Search');
|
||||
await canvas.findByText('Settings');
|
||||
await canvas.findByText('Linkedin');
|
||||
await canvas.findByText('All companies (v2)');
|
||||
await canvas.findByText('All');
|
||||
},
|
||||
};
|
||||
|
||||
@ -2,8 +2,9 @@ import { getOperationName } from '@apollo/client/utilities';
|
||||
import { expect } from '@storybook/jest';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { within } from '@storybook/test';
|
||||
import { graphql, HttpResponse } from 'msw';
|
||||
import { HttpResponse, graphql } from 'msw';
|
||||
|
||||
import { GET_PUBLIC_WORKSPACE_DATA_BY_SUBDOMAIN } from '@/auth/graphql/queries/getPublicWorkspaceDataBySubdomain';
|
||||
import { GET_CLIENT_CONFIG } from '@/client-config/graphql/queries/getClientConfig';
|
||||
import { FIND_MANY_OBJECT_METADATA_ITEMS } from '@/object-metadata/graphql/queries';
|
||||
import { GET_CURRENT_USER } from '@/users/graphql/queries/getCurrentUser';
|
||||
@ -14,6 +15,7 @@ import {
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { graphqlMocks, metadataGraphql } from '~/testing/graphqlMocks';
|
||||
import { mockedClientConfig } from '~/testing/mock-data/config';
|
||||
import { mockedPublicWorkspaceDataBySubdomain } from '~/testing/mock-data/publicWorkspaceDataBySubdomain';
|
||||
import { mockedUserData } from '~/testing/mock-data/users';
|
||||
|
||||
const userMetadataLoaderMocks = {
|
||||
@ -33,6 +35,17 @@ const userMetadataLoaderMocks = {
|
||||
},
|
||||
});
|
||||
}),
|
||||
graphql.query(
|
||||
getOperationName(GET_PUBLIC_WORKSPACE_DATA_BY_SUBDOMAIN) ?? '',
|
||||
() => {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
publicWorkspaceDataBySubdomain:
|
||||
mockedPublicWorkspaceDataBySubdomain,
|
||||
},
|
||||
});
|
||||
},
|
||||
),
|
||||
metadataGraphql.query(
|
||||
getOperationName(FIND_MANY_OBJECT_METADATA_ITEMS) ?? '',
|
||||
() => {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { within } from '@storybook/test';
|
||||
import { graphql, HttpResponse } from 'msw';
|
||||
import { HttpResponse, graphql } from 'msw';
|
||||
|
||||
import { SettingsDevelopersWebhooksDetail } from '~/pages/settings/developers/webhooks/components/SettingsDevelopersWebhookDetail';
|
||||
import {
|
||||
@ -50,6 +50,8 @@ export const Default: Story = {
|
||||
const canvas = within(canvasElement);
|
||||
await canvas.findByText(
|
||||
'We will send POST requests to this endpoint for every new event',
|
||||
undefined,
|
||||
{ timeout: 10000 },
|
||||
);
|
||||
await canvas.findByText('Delete this integration');
|
||||
},
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
import { GetPublicWorkspaceDataBySubdomainQuery } from '~/generated/graphql';
|
||||
|
||||
export const mockedPublicWorkspaceDataBySubdomain: GetPublicWorkspaceDataBySubdomainQuery['getPublicWorkspaceDataBySubdomain'] =
|
||||
{
|
||||
__typename: 'PublicWorkspaceDataOutput',
|
||||
id: '9870323e-22c3-4d14-9b7f-5bdc84f7d6ee',
|
||||
logo: 'workspace-logo/original/c88deb49-7636-4560-918d-08c3265ffb20.49?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3b3Jrc3BhY2VJZCI6Ijk4NzAzMjNlLTIyYzMtNGQxNC05YjdmLTViZGM4NGY3ZDZlZSIsImlhdCI6MTczNjU0MDU0MywiZXhwIjoxNzM2NjI2OTQzfQ.C8cnHu09VGseRbQAMM4nhiO6z4TLG03ntFTvxm53-xg',
|
||||
displayName: 'Twenty Eng',
|
||||
subdomain: 'twenty-eng',
|
||||
authProviders: {
|
||||
__typename: 'AuthProviders',
|
||||
sso: [],
|
||||
google: true,
|
||||
magicLink: false,
|
||||
password: true,
|
||||
microsoft: false,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user