mirror of
https://github.com/twentyhq/twenty
synced 2026-04-21 13:37:22 +00:00
Move tools/eslint-rules to packages/twenty-eslint-rules (#17203)
## Summary Moves the custom ESLint rules from `tools/eslint-rules` to `packages/twenty-eslint-rules` for better organization within the monorepo packages structure. ## Changes - Move `eslint-rules` from `tools/` to `packages/twenty-eslint-rules` - Use `loadWorkspaceRules` from `@nx/eslint-plugin` to load custom rules - Update all ESLint configs to use the `twenty/` rule prefix instead of `@nx/workspace-` - Update `project.json`, `jest.config.mjs` with new paths - Update `package.json` workspaces and `nx.json` cache inputs - Update Dockerfile reference ## Technical Details The custom ESLint rules are now loaded using Nx's `loadWorkspaceRules` utility which: - Handles TypeScript transpilation automatically - Allows loading workspace rules from any directory - Provides a cleaner approach than the previous `@nx/workspace-` convention ## Testing - Verified all 17 custom ESLint rules load correctly from the new location - Verified linting works on dependent packages (twenty-front, twenty-server, etc.)
This commit is contained in:
parent
a429bc922d
commit
c737028dd6
225 changed files with 622 additions and 4600 deletions
|
|
@ -11,6 +11,8 @@ import unicornPlugin from 'eslint-plugin-unicorn';
|
|||
import unusedImportsPlugin from 'eslint-plugin-unused-imports';
|
||||
import jsoncParser from 'jsonc-eslint-parser';
|
||||
|
||||
const twentyRules = await nxPlugin.loadWorkspaceRules('packages/twenty-eslint-rules');
|
||||
|
||||
export default [
|
||||
// Base JavaScript configuration
|
||||
js.configs.recommended,
|
||||
|
|
@ -195,6 +197,7 @@ export default [
|
|||
plugins: {
|
||||
...mdxPlugin.flat.plugins,
|
||||
'@nx': nxPlugin,
|
||||
'twenty': { rules: twentyRules },
|
||||
},
|
||||
},
|
||||
mdxPlugin.flatCodeBlocks,
|
||||
|
|
@ -205,9 +208,9 @@ export default [
|
|||
'unused-imports/no-unused-imports': 'off',
|
||||
'unused-imports/no-unused-vars': 'off',
|
||||
// Enforce JSX tags on separate lines to prevent Crowdin translation issues
|
||||
'@nx/workspace-mdx-component-newlines': 'error',
|
||||
'twenty/mdx-component-newlines': 'error',
|
||||
// Disallow angle bracket placeholders to prevent Crowdin translation errors
|
||||
'@nx/workspace-no-angle-bracket-placeholders': 'error',
|
||||
'twenty/no-angle-bracket-placeholders': 'error',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
const nxPreset = require('@nx/jest/preset').default;
|
||||
|
||||
module.exports = { ...nxPreset };
|
||||
module.exports = {
|
||||
...nxPreset,
|
||||
// Override the new testEnvironmentOptions added in @nx/jest 22.3.3
|
||||
// which breaks Lingui's module resolution
|
||||
testEnvironmentOptions: {},
|
||||
};
|
||||
|
||||
|
|
|
|||
117
nx.json
117
nx.json
|
|
@ -4,9 +4,7 @@
|
|||
"libsDir": "packages"
|
||||
},
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*"
|
||||
],
|
||||
"default": ["{projectRoot}/**/*"],
|
||||
"excludeStories": [
|
||||
"default",
|
||||
"!{projectRoot}/.storybook/*",
|
||||
|
|
@ -34,26 +32,17 @@
|
|||
"targetDefaults": {
|
||||
"build": {
|
||||
"cache": true,
|
||||
"inputs": [
|
||||
"^production",
|
||||
"production"
|
||||
],
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
"inputs": ["^production", "production"],
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"start": {
|
||||
"cache": false,
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"cache": true,
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
],
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"eslintConfig": "{projectRoot}/eslint.config.mjs",
|
||||
"cache": true,
|
||||
|
|
@ -67,9 +56,7 @@
|
|||
"fix": true
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"lint:diff-with-main": {
|
||||
"executor": "nx:run-commands",
|
||||
|
|
@ -103,9 +90,7 @@
|
|||
"write": true
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"typecheck": {
|
||||
"executor": "nx:run-commands",
|
||||
|
|
@ -119,30 +104,22 @@
|
|||
"watch": true
|
||||
}
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"test": {
|
||||
"executor": "@nx/jest:jest",
|
||||
"cache": true,
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
],
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": [
|
||||
"^default",
|
||||
"excludeStories",
|
||||
"{workspaceRoot}/jest.preset.js"
|
||||
],
|
||||
"outputs": [
|
||||
"{projectRoot}/coverage"
|
||||
],
|
||||
"outputs": ["{projectRoot}/coverage"],
|
||||
"options": {
|
||||
"jestConfig": "{projectRoot}/jest.config.mjs",
|
||||
"coverage": true,
|
||||
"coverageReporters": [
|
||||
"text-summary"
|
||||
],
|
||||
"coverageReporters": ["text-summary"],
|
||||
"cacheDirectory": "../../.cache/jest/{projectRoot}"
|
||||
},
|
||||
"configurations": {
|
||||
|
|
@ -151,10 +128,7 @@
|
|||
"maxWorkers": 3
|
||||
},
|
||||
"coverage": {
|
||||
"coverageReporters": [
|
||||
"lcov",
|
||||
"text"
|
||||
]
|
||||
"coverageReporters": ["lcov", "text"]
|
||||
},
|
||||
"watch": {
|
||||
"watch": true
|
||||
|
|
@ -163,36 +137,25 @@
|
|||
},
|
||||
"test:e2e": {
|
||||
"cache": true,
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"storybook:build": {
|
||||
"executor": "nx:run-commands",
|
||||
"cache": true,
|
||||
"inputs": [
|
||||
"^default",
|
||||
"excludeTests"
|
||||
],
|
||||
"outputs": [
|
||||
"{projectRoot}/{options.output-dir}"
|
||||
],
|
||||
"inputs": ["^default", "excludeTests"],
|
||||
"outputs": ["{projectRoot}/{options.output-dir}"],
|
||||
"options": {
|
||||
"cwd": "{projectRoot}",
|
||||
"command": "NODE_OPTIONS='--max-old-space-size=10240' VITE_DISABLE_TYPESCRIPT_CHECKER=true storybook build --test",
|
||||
"output-dir": "storybook-static",
|
||||
"config-dir": ".storybook"
|
||||
},
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
]
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"storybook:serve:dev": {
|
||||
"executor": "nx:run-commands",
|
||||
"cache": true,
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
],
|
||||
"dependsOn": ["^build"],
|
||||
"options": {
|
||||
"cwd": "{projectRoot}",
|
||||
"command": "storybook dev",
|
||||
|
|
@ -201,9 +164,7 @@
|
|||
},
|
||||
"storybook:serve:static": {
|
||||
"executor": "nx:run-commands",
|
||||
"dependsOn": [
|
||||
"storybook:build"
|
||||
],
|
||||
"dependsOn": ["storybook:build"],
|
||||
"options": {
|
||||
"cwd": "{projectRoot}",
|
||||
"command": "npx http-server {args.staticDir} -a={args.host} --port={args.port} --silent={args.silent}",
|
||||
|
|
@ -216,13 +177,8 @@
|
|||
"storybook:test": {
|
||||
"executor": "nx:run-commands",
|
||||
"cache": true,
|
||||
"inputs": [
|
||||
"^default",
|
||||
"excludeTests"
|
||||
],
|
||||
"outputs": [
|
||||
"{projectRoot}/coverage/storybook"
|
||||
],
|
||||
"inputs": ["^default", "excludeTests"],
|
||||
"outputs": ["{projectRoot}/coverage/storybook"],
|
||||
"options": {
|
||||
"cwd": "{projectRoot}",
|
||||
"commands": [
|
||||
|
|
@ -238,10 +194,7 @@
|
|||
},
|
||||
"storybook:test:no-coverage": {
|
||||
"executor": "nx:run-commands",
|
||||
"inputs": [
|
||||
"^default",
|
||||
"excludeTests"
|
||||
],
|
||||
"inputs": ["^default", "excludeTests"],
|
||||
"options": {
|
||||
"cwd": "{projectRoot}",
|
||||
"commands": [
|
||||
|
|
@ -326,29 +279,21 @@
|
|||
"inputs": [
|
||||
"default",
|
||||
"{workspaceRoot}/eslint.config.mjs",
|
||||
"{workspaceRoot}/tools/eslint-rules/**/*"
|
||||
]
|
||||
},
|
||||
"@nx/vite:test": {
|
||||
"cache": true,
|
||||
"inputs": [
|
||||
"default",
|
||||
"^default"
|
||||
"{workspaceRoot}/packages/twenty-eslint-rules/**/*"
|
||||
]
|
||||
},
|
||||
"@nx/vite:build": {
|
||||
"cache": true,
|
||||
"dependsOn": [
|
||||
"^build"
|
||||
],
|
||||
"inputs": [
|
||||
"default",
|
||||
"^default"
|
||||
]
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["default", "^default"]
|
||||
},
|
||||
"@nx/vitest:test": {
|
||||
"cache": true,
|
||||
"inputs": ["default", "^default"]
|
||||
}
|
||||
},
|
||||
"installation": {
|
||||
"version": "22.0.3"
|
||||
"version": "22.3.3"
|
||||
},
|
||||
"generators": {
|
||||
"@nx/react": {
|
||||
|
|
@ -376,9 +321,7 @@
|
|||
"tasksRunnerOptions": {
|
||||
"default": {
|
||||
"options": {
|
||||
"cacheableOperations": [
|
||||
"storybook:build"
|
||||
]
|
||||
"cacheableOperations": ["storybook:build"]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
24
package.json
24
package.json
|
|
@ -72,14 +72,14 @@
|
|||
"@graphql-codegen/typescript": "^3.0.4",
|
||||
"@graphql-codegen/typescript-operations": "^3.0.4",
|
||||
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
|
||||
"@nx/eslint": "22.0.3",
|
||||
"@nx/eslint-plugin": "22.0.3",
|
||||
"@nx/jest": "22.0.3",
|
||||
"@nx/js": "22.0.3",
|
||||
"@nx/react": "22.0.3",
|
||||
"@nx/storybook": "22.0.3",
|
||||
"@nx/vite": "22.0.3",
|
||||
"@nx/web": "22.0.3",
|
||||
"@nx/eslint": "22.3.3",
|
||||
"@nx/eslint-plugin": "22.3.3",
|
||||
"@nx/jest": "22.3.3",
|
||||
"@nx/js": "22.3.3",
|
||||
"@nx/react": "22.3.3",
|
||||
"@nx/storybook": "22.3.3",
|
||||
"@nx/vite": "22.3.3",
|
||||
"@nx/web": "22.3.3",
|
||||
"@sentry/types": "^8",
|
||||
"@storybook-community/storybook-addon-cookie": "^5.0.0",
|
||||
"@storybook/addon-coverage": "^3.0.0",
|
||||
|
|
@ -165,7 +165,7 @@
|
|||
"jsdom": "~22.1.0",
|
||||
"msw": "^2.0.11",
|
||||
"msw-storybook-addon": "^2.0.5",
|
||||
"nx": "22.0.3",
|
||||
"nx": "22.3.3",
|
||||
"prettier": "^3.1.1",
|
||||
"raw-loader": "^4.0.2",
|
||||
"rimraf": "^5.0.5",
|
||||
|
|
@ -195,7 +195,9 @@
|
|||
"typescript": "5.9.2",
|
||||
"graphql-redis-subscriptions/ioredis": "^5.6.0",
|
||||
"prosemirror-view": "1.40.0",
|
||||
"prosemirror-transform": "1.10.4"
|
||||
"prosemirror-transform": "1.10.4",
|
||||
"@lingui/core": "5.1.2",
|
||||
"@types/qs": "6.9.16"
|
||||
},
|
||||
"version": "0.2.1",
|
||||
"nx": {},
|
||||
|
|
@ -220,7 +222,7 @@
|
|||
"packages/twenty-apps",
|
||||
"packages/twenty-cli",
|
||||
"packages/create-twenty-app",
|
||||
"tools/eslint-rules"
|
||||
"packages/twenty-eslint-rules"
|
||||
]
|
||||
},
|
||||
"prettier": {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import typescriptParser from '@typescript-eslint/parser';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import reactConfig from '../../../../../tools/eslint-rules/eslint.config.react.mjs';
|
||||
import reactConfig from '../../../../twenty-eslint-rules/eslint.config.react.mjs';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ COPY ./yarn.lock .
|
|||
COPY ./.yarnrc.yml .
|
||||
COPY ./.yarn/releases /app/.yarn/releases
|
||||
COPY ./.yarn/patches /app/.yarn/patches
|
||||
COPY ./tools/eslint-rules /app/tools/eslint-rules
|
||||
COPY ./packages/twenty-eslint-rules /app/packages/twenty-eslint-rules
|
||||
COPY ./packages/twenty-ui/package.json /app/packages/twenty-ui/
|
||||
COPY ./packages/twenty-shared/package.json /app/packages/twenty-shared/
|
||||
COPY ./packages/twenty-website/package.json /app/packages/twenty-website/package.json
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import typescriptParser from '@typescript-eslint/parser';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import reactConfig from '../../tools/eslint-rules/eslint.config.react.mjs';
|
||||
import reactConfig from '../twenty-eslint-rules/eslint.config.react.mjs';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint-disable @nx/workspace-no-hardcoded-colors */
|
||||
/* eslint-disable twenty/no-hardcoded-colors */
|
||||
|
||||
const grayScale = {
|
||||
gray100: '#000000',
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ import unicornPlugin from 'eslint-plugin-unicorn';
|
|||
import unusedImportsPlugin from 'eslint-plugin-unused-imports';
|
||||
import jsoncParser from 'jsonc-eslint-parser';
|
||||
|
||||
const twentyRules = await nxPlugin.loadWorkspaceRules('packages/twenty-eslint-rules');
|
||||
|
||||
export default [
|
||||
// Base JavaScript configuration
|
||||
js.configs.recommended,
|
||||
|
|
@ -34,6 +36,7 @@ export default [
|
|||
'import': importPlugin,
|
||||
'unused-imports': unusedImportsPlugin,
|
||||
'unicorn': unicornPlugin,
|
||||
'twenty': { rules: twentyRules },
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
|
|
@ -567,17 +570,17 @@ export default [
|
|||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
|
||||
// Custom workspace rules
|
||||
'@nx/workspace-effect-components': 'error',
|
||||
'@nx/workspace-no-hardcoded-colors': 'error',
|
||||
'@nx/workspace-matching-state-variable': 'error',
|
||||
'@nx/workspace-sort-css-properties-alphabetically': 'error',
|
||||
'@nx/workspace-styled-components-prefixed-with-styled': 'error',
|
||||
'@nx/workspace-no-state-useref': 'error',
|
||||
'@nx/workspace-component-props-naming': 'error',
|
||||
'@nx/workspace-explicit-boolean-predicates-in-if': 'error',
|
||||
'@nx/workspace-use-getLoadable-and-getValue-to-get-atoms': 'error',
|
||||
'@nx/workspace-useRecoilCallback-has-dependency-array': 'error',
|
||||
'@nx/workspace-no-navigate-prefer-link': 'error',
|
||||
'twenty/effect-components': 'error',
|
||||
'twenty/no-hardcoded-colors': 'error',
|
||||
'twenty/matching-state-variable': 'error',
|
||||
'twenty/sort-css-properties-alphabetically': 'error',
|
||||
'twenty/styled-components-prefixed-with-styled': 'error',
|
||||
'twenty/no-state-useref': 'error',
|
||||
'twenty/component-props-naming': 'error',
|
||||
'twenty/explicit-boolean-predicates-in-if': 'error',
|
||||
'twenty/use-getLoadable-and-getValue-to-get-atoms': 'error',
|
||||
'twenty/useRecoilCallback-has-dependency-array': 'error',
|
||||
'twenty/no-navigate-prefer-link': 'error',
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -721,7 +724,7 @@ export default [
|
|||
},
|
||||
},
|
||||
],
|
||||
'@nx/workspace-max-consts-per-file': ['error', { max: 1 }],
|
||||
'twenty/max-consts-per-file': ['error', { max: 1 }],
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -778,7 +781,7 @@ export default [
|
|||
},
|
||||
},
|
||||
],
|
||||
'@nx/workspace-max-consts-per-file': ['error', { max: 1 }],
|
||||
'twenty/max-consts-per-file': ['error', { max: 1 }],
|
||||
},
|
||||
},
|
||||
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
export default {
|
||||
displayName: 'eslint-rules',
|
||||
displayName: 'twenty-eslint-rules',
|
||||
silent: false,
|
||||
preset: '../../jest.preset.js',
|
||||
transform: {
|
||||
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/tools/eslint-rules',
|
||||
coverageDirectory: '../../coverage/packages/twenty-eslint-rules',
|
||||
};
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "eslint-rules",
|
||||
"name": "twenty-eslint-rules",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "tools/eslint-rules",
|
||||
"sourceRoot": "packages/twenty-eslint-rules",
|
||||
"tags": ["scope:shared"],
|
||||
"targets": {
|
||||
"lint": {
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
import { ThemeProvider } from '@emotion/react';
|
||||
import { i18n } from '@lingui/core';
|
||||
import { I18nProvider } from '@lingui/react';
|
||||
import { type Preview } from '@storybook/react-vite';
|
||||
import { initialize, mswLoader } from 'msw-storybook-addon';
|
||||
import { useEffect } from 'react';
|
||||
import { SOURCE_LOCALE } from 'twenty-shared/translations';
|
||||
//import { useDarkMode } from 'storybook-dark-mode';
|
||||
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
|
|
@ -10,6 +13,12 @@ import { RootDecorator } from '../src/testing/decorators/RootDecorator';
|
|||
import 'react-loading-skeleton/dist/skeleton.css';
|
||||
import 'twenty-ui/style.css';
|
||||
import { THEME_LIGHT, ThemeContextProvider } from 'twenty-ui/theme';
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { messages as enMessages } from '../src/locales/generated/en';
|
||||
|
||||
// Initialize i18n globally for all stories
|
||||
i18n.load({ [SOURCE_LOCALE]: enMessages });
|
||||
i18n.activate(SOURCE_LOCALE);
|
||||
import { mockedUserJWT } from '~/testing/mock-data/jwt';
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { ClickOutsideListenerContext } from '../src/modules/ui/utilities/pointer-event/contexts/ClickOutsideListenerContext';
|
||||
|
|
@ -59,6 +68,7 @@ const preview: Preview = {
|
|||
}, [theme]);
|
||||
|
||||
return (
|
||||
<I18nProvider i18n={i18n}>
|
||||
<ThemeProvider theme={theme}>
|
||||
<ThemeContextProvider theme={theme}>
|
||||
<ClickOutsideListenerContext.Provider
|
||||
|
|
@ -68,6 +78,7 @@ const preview: Preview = {
|
|||
</ClickOutsideListenerContext.Provider>
|
||||
</ThemeContextProvider>
|
||||
</ThemeProvider>
|
||||
</I18nProvider>
|
||||
);
|
||||
},
|
||||
RootDecorator,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import typescriptParser from '@typescript-eslint/parser';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import reactConfig from '../../tools/eslint-rules/eslint.config.react.mjs';
|
||||
import reactConfig from '../twenty-eslint-rules/eslint.config.react.mjs';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ const jestConfig = {
|
|||
preset: '../../jest.preset.js',
|
||||
setupFilesAfterEnv: ['./setupTests.ts'],
|
||||
testEnvironment: 'jsdom',
|
||||
testEnvironmentOptions: {},
|
||||
|
||||
transformIgnorePatterns: [
|
||||
'/node_modules/(?!(twenty-ui)/.*)',
|
||||
|
|
|
|||
|
|
@ -4,6 +4,14 @@
|
|||
// learn more: https://github.com/testing-library/jest-dom
|
||||
import '@testing-library/jest-dom';
|
||||
|
||||
import { i18n } from '@lingui/core';
|
||||
import { SOURCE_LOCALE } from 'twenty-shared/translations';
|
||||
import { messages as enMessages } from '~/locales/generated/en';
|
||||
|
||||
// Initialize i18n for all tests
|
||||
i18n.load({ [SOURCE_LOCALE]: enMessages });
|
||||
i18n.activate(SOURCE_LOCALE);
|
||||
|
||||
// Add Jest matchers for toThrowError and other missing methods
|
||||
declare global {
|
||||
namespace jest {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { useRef } from 'react';
|
||||
|
||||
export const useFirstMountState = (): boolean => {
|
||||
// eslint-disable-next-line @nx/workspace-no-state-useref
|
||||
// eslint-disable-next-line twenty/no-state-useref
|
||||
const isFirst = useRef(true);
|
||||
|
||||
if (isFirst.current) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import {
|
|||
getCanvasElementForDropdownTesting,
|
||||
} from 'twenty-ui/testing';
|
||||
import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
const deleteMock = test.fn();
|
||||
const addToFavoritesMock = test.fn();
|
||||
const exportMock = test.fn();
|
||||
|
|
@ -24,7 +23,6 @@ const meta: Meta<typeof CommandMenuActionMenuDropdown> = {
|
|||
title: 'Modules/ActionMenu/CommandMenuActionMenuDropdown',
|
||||
component: CommandMenuActionMenuDropdown,
|
||||
decorators: [
|
||||
I18nFrontDecorator,
|
||||
(Story) => (
|
||||
<RecoilRoot
|
||||
initializeState={({ set }) => {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import {
|
|||
getCanvasElementForDropdownTesting,
|
||||
} from 'twenty-ui/testing';
|
||||
import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
|
||||
const deleteMock = test.fn();
|
||||
const addToFavoritesMock = test.fn();
|
||||
|
|
@ -25,7 +24,6 @@ const meta: Meta<typeof RecordIndexActionMenuDropdown> = {
|
|||
title: 'Modules/ActionMenu/RecordIndexActionMenuDropdown',
|
||||
component: RecordIndexActionMenuDropdown,
|
||||
decorators: [
|
||||
I18nFrontDecorator,
|
||||
(Story) => (
|
||||
<RecoilRoot
|
||||
initializeState={({ set }) => {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSi
|
|||
import { LayoutRenderingProvider } from '@/ui/layout/contexts/LayoutRenderingContext';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { PageLayoutType } from '~/generated/graphql';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
|
@ -18,7 +17,6 @@ const meta: Meta<typeof CalendarEventsCard> = {
|
|||
title: 'Modules/Activities/Calendar/CalendarEventsCard',
|
||||
component: CalendarEventsCard,
|
||||
decorators: [
|
||||
I18nFrontDecorator,
|
||||
ComponentDecorator,
|
||||
ObjectMetadataItemsDecorator,
|
||||
SnackBarDecorator,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import { type ActivityTargetableObject } from '@/activities/types/ActivityTarget
|
|||
import { ObjectFilterDropdownComponentInstanceContext } from '@/object-record/object-filter-dropdown/states/contexts/ObjectFilterDropdownComponentInstanceContext';
|
||||
import { TabListComponentInstanceContext } from '@/ui/layout/tab-list/states/contexts/TabListComponentInstanceContext';
|
||||
import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
|
@ -29,7 +28,6 @@ const meta: Meta<typeof TaskGroups> = {
|
|||
ComponentWithRouterDecorator,
|
||||
ObjectMetadataItemsDecorator,
|
||||
SnackBarDecorator,
|
||||
I18nFrontDecorator,
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|||
import { TaskList } from '@/activities/tasks/components/TaskList';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { RightDrawerDecorator } from '~/testing/decorators/RightDrawerDecorator';
|
||||
|
|
@ -17,7 +16,6 @@ const meta: Meta<typeof TaskList> = {
|
|||
decorators: [
|
||||
ComponentDecorator,
|
||||
ContextStoreDecorator,
|
||||
I18nFrontDecorator,
|
||||
MemoryRouterDecorator,
|
||||
ObjectMetadataItemsDecorator,
|
||||
SnackBarDecorator,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { HttpResponse, graphql } from 'msw';
|
|||
|
||||
import { EventCardCalendarEvent } from '@/activities/timeline-activities/rows/calendar/components/EventCardCalendarEvent';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
|
||||
|
|
@ -11,7 +10,6 @@ const meta: Meta<typeof EventCardCalendarEvent> = {
|
|||
title: 'Modules/TimelineActivities/Rows/CalendarEvent/EventCardCalendarEvent',
|
||||
component: EventCardCalendarEvent,
|
||||
decorators: [
|
||||
I18nFrontDecorator,
|
||||
ComponentDecorator,
|
||||
ObjectMetadataItemsDecorator,
|
||||
SnackBarDecorator,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { type TimelineActivity } from '@/activities/timeline-activities/types/Ti
|
|||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
|
||||
import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { generatedMockObjectMetadataItems } from '~/testing/utils/generatedMockObjectMetadataItems';
|
||||
|
|
@ -45,7 +44,6 @@ const meta: Meta<typeof EventRowMainObjectUpdated> = {
|
|||
ObjectMetadataItemsDecorator,
|
||||
SnackBarDecorator,
|
||||
RouterDecorator,
|
||||
I18nFrontDecorator,
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import { TimelineActivityContext } from '@/activities/timeline-activities/contex
|
|||
import { EventCardMessage } from '@/activities/timeline-activities/rows/message/components/EventCardMessage';
|
||||
import { FIELD_RESTRICTED_ADDITIONAL_PERMISSIONS_REQUIRED } from 'twenty-shared/constants';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
|
||||
|
|
@ -14,7 +13,6 @@ const meta: Meta<typeof EventCardMessage> = {
|
|||
title: 'Modules/TimelineActivities/Rows/Message/EventCardMessage',
|
||||
component: EventCardMessage,
|
||||
decorators: [
|
||||
I18nFrontDecorator,
|
||||
ComponentDecorator,
|
||||
ObjectMetadataItemsDecorator,
|
||||
SnackBarDecorator,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|||
import { expect, fn, userEvent, waitFor } from 'storybook/test';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';
|
||||
|
|
@ -75,7 +74,6 @@ const meta: Meta<typeof EditorWrapper> = {
|
|||
SnackBarDecorator,
|
||||
RouterDecorator,
|
||||
WorkspaceDecorator,
|
||||
I18nFrontDecorator,
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { type ExtendedUIMessage } from 'twenty-shared/ai';
|
|||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
|
||||
import { AIChatMessage } from '@/ai/components/AIChatMessage';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { RootDecorator } from '~/testing/decorators/RootDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
|
||||
|
|
@ -176,12 +175,7 @@ print(df.head())`,
|
|||
const meta: Meta<typeof AIChatMessage> = {
|
||||
title: 'Modules/AI/AIChatMessage',
|
||||
component: AIChatMessage,
|
||||
decorators: [
|
||||
ComponentDecorator,
|
||||
RootDecorator,
|
||||
I18nFrontDecorator,
|
||||
SnackBarDecorator,
|
||||
],
|
||||
decorators: [ComponentDecorator, RootDecorator, SnackBarDecorator],
|
||||
parameters: {
|
||||
container: { width: 700 },
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { expect, userEvent, within } from 'storybook/test';
|
|||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
|
||||
import { CodeExecutionDisplay } from '@/ai/components/CodeExecutionDisplay';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
|
||||
const samplePythonCode = `import pandas as pd
|
||||
|
|
@ -31,7 +30,7 @@ plt.savefig('revenue_chart.png')`;
|
|||
const meta: Meta<typeof CodeExecutionDisplay> = {
|
||||
title: 'Modules/AI/CodeExecutionDisplay',
|
||||
component: CodeExecutionDisplay,
|
||||
decorators: [I18nFrontDecorator, SnackBarDecorator, ComponentDecorator],
|
||||
decorators: [SnackBarDecorator, ComponentDecorator],
|
||||
parameters: {
|
||||
container: { width: 600 },
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,13 +3,12 @@ import { expect, userEvent, within } from 'storybook/test';
|
|||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
|
||||
import { TerminalOutput } from '@/ai/components/TerminalOutput';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
|
||||
const meta: Meta<typeof TerminalOutput> = {
|
||||
title: 'Modules/AI/TerminalOutput',
|
||||
component: TerminalOutput,
|
||||
decorators: [I18nFrontDecorator, SnackBarDecorator, ComponentDecorator],
|
||||
decorators: [SnackBarDecorator, ComponentDecorator],
|
||||
parameters: {
|
||||
container: { width: 500 },
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import { isDefined } from 'twenty-shared/utils';
|
|||
import { ApolloFactory, type Options } from '@/apollo/services/apollo.factory';
|
||||
|
||||
export const useApolloFactory = (options: Partial<Options<any>> = {}) => {
|
||||
// eslint-disable-next-line @nx/workspace-no-state-useref
|
||||
// eslint-disable-next-line twenty/no-state-useref
|
||||
const apolloRef = useRef<ApolloFactory<NormalizedCacheObject> | null>(null);
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import { OperationType } from '@/apollo/types/operation-type';
|
||||
|
||||
const operationTypeColors = {
|
||||
// eslint-disable-next-line @nx/workspace-no-hardcoded-colors
|
||||
// eslint-disable-next-line twenty/no-hardcoded-colors
|
||||
query: '#03A9F4',
|
||||
// eslint-disable-next-line @nx/workspace-no-hardcoded-colors
|
||||
// eslint-disable-next-line twenty/no-hardcoded-colors
|
||||
mutation: '#61A600',
|
||||
// eslint-disable-next-line @nx/workspace-no-hardcoded-colors
|
||||
// eslint-disable-next-line twenty/no-hardcoded-colors
|
||||
subscription: '#61A600',
|
||||
// eslint-disable-next-line @nx/workspace-no-hardcoded-colors
|
||||
// eslint-disable-next-line twenty/no-hardcoded-colors
|
||||
error: '#F51818',
|
||||
// eslint-disable-next-line @nx/workspace-no-hardcoded-colors
|
||||
// eslint-disable-next-line twenty/no-hardcoded-colors
|
||||
default: '#61A600',
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ export const loggerLink = (getSchemaName: (operation: Operation) => string) =>
|
|||
errors.forEach((err: any) => {
|
||||
logDebug(
|
||||
`%c${err.message}`,
|
||||
// eslint-disable-next-line @nx/workspace-no-hardcoded-colors
|
||||
// eslint-disable-next-line twenty/no-hardcoded-colors
|
||||
'color: #F51818; font-weight: lighter',
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -31,13 +31,13 @@ export const variables = {
|
|||
email,
|
||||
password,
|
||||
workspacePersonalInviteToken: null,
|
||||
locale: '',
|
||||
locale: 'en',
|
||||
},
|
||||
signUpInWorkspace: {
|
||||
email,
|
||||
password,
|
||||
workspacePersonalInviteToken: null,
|
||||
locale: '',
|
||||
locale: 'en',
|
||||
},
|
||||
getCurrentUser: {},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ import { RecordComponentInstanceContextsWrapper } from '@/object-record/componen
|
|||
import { ViewComponentInstanceContext } from '@/views/states/contexts/ViewComponentInstanceContext';
|
||||
import { HttpResponse, graphql } from 'msw';
|
||||
import { IconDotsVertical } from 'twenty-ui/display';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { JestContextStoreSetter } from '~/testing/jest/JestContextStoreSetter';
|
||||
|
||||
const openTimeout = 50;
|
||||
|
|
@ -72,7 +71,6 @@ const meta: Meta<typeof CommandMenu> = {
|
|||
title: 'Modules/CommandMenu/CommandMenu',
|
||||
component: CommandMenuRouter,
|
||||
decorators: [
|
||||
I18nFrontDecorator,
|
||||
(Story) => {
|
||||
const setCurrentWorkspace = useSetRecoilState(currentWorkspaceState);
|
||||
const setCurrentUserWorkspace = useSetRecoilState(
|
||||
|
|
|
|||
|
|
@ -7,13 +7,11 @@ import { KeyboardShortcutMenu } from '@/keyboard-shortcut-menu/components/Keyboa
|
|||
import { useKeyboardShortcutMenu } from '@/keyboard-shortcut-menu/hooks/useKeyboardShortcutMenu';
|
||||
import { useEffect } from 'react';
|
||||
import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
|
||||
const meta: Meta<typeof KeyboardShortcutMenu> = {
|
||||
title: 'Modules/KeyboardShortcutMenu/KeyboardShortcutMenu',
|
||||
component: KeyboardShortcutMenu,
|
||||
decorators: [
|
||||
I18nFrontDecorator,
|
||||
(Story) => {
|
||||
const { openKeyboardShortcutMenu } = useKeyboardShortcutMenu();
|
||||
useEffect(() => {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import {
|
|||
} from '@/navigation/components/AppNavigationDrawer';
|
||||
import { isNavigationDrawerExpandedState } from '@/ui/navigation/states/isNavigationDrawerExpanded';
|
||||
import { AppPath } from 'twenty-shared/types';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
|
||||
const MobileNavigationDrawerStateSetterEffect = ({
|
||||
mobileNavigationDrawer = 'main',
|
||||
|
|
@ -55,7 +54,6 @@ const meta: Meta<StoryArgs> = {
|
|||
decorators: [
|
||||
IconsProviderDecorator,
|
||||
ObjectMetadataItemsDecorator,
|
||||
I18nFrontDecorator,
|
||||
(Story, { args }) => (
|
||||
<MemoryRouter initialEntries={[args.routePath]}>
|
||||
<Story />
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import { MemoryRouter } from 'react-router-dom';
|
|||
import { useSetRecoilState } from 'recoil';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { IconsProviderDecorator } from '~/testing/decorators/IconsProviderDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
|
|
@ -31,7 +30,6 @@ const meta: Meta<typeof ObjectOptionsDropdownContent> = {
|
|||
'Modules/ObjectRecord/ObjectOptionsDropdown/ObjectOptionsDropdownContent',
|
||||
component: ObjectOptionsDropdownContent,
|
||||
decorators: [
|
||||
I18nFrontDecorator,
|
||||
(Story) => {
|
||||
const setObjectMetadataItems = useSetRecoilState(
|
||||
objectMetadataItemsState,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import { coreViewsState } from '@/views/states/coreViewState';
|
|||
import { useSetRecoilState } from 'recoil';
|
||||
import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';
|
||||
import { ContextStoreDecorator } from '~/testing/decorators/ContextStoreDecorator';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { IconsProviderDecorator } from '~/testing/decorators/IconsProviderDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
|
|
@ -141,7 +140,6 @@ const meta: Meta<typeof RecordCalendarMonth> = {
|
|||
SnackBarDecorator,
|
||||
ComponentDecorator,
|
||||
IconsProviderDecorator,
|
||||
I18nFrontDecorator,
|
||||
RouterDecorator,
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import { RecordDetailRelationSection } from '@/object-record/record-field-list/r
|
|||
import { LayoutRenderingProvider } from '@/ui/layout/contexts/LayoutRenderingContext';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { PageLayoutType } from '~/generated/graphql';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { RightDrawerDecorator } from '~/testing/decorators/RightDrawerDecorator';
|
||||
import { allMockPersonRecords } from '~/testing/mock-data/people';
|
||||
import { generatedMockObjectMetadataItems } from '~/testing/utils/generatedMockObjectMetadataItems';
|
||||
|
|
@ -78,7 +77,6 @@ const meta: Meta<typeof RecordDetailRelationSection> = {
|
|||
ObjectMetadataItemsDecorator,
|
||||
SnackBarDecorator,
|
||||
MemoryRouterDecorator,
|
||||
I18nFrontDecorator,
|
||||
],
|
||||
parameters: {
|
||||
msw: graphqlMocks,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { FormAddressFieldInput } from '@/object-record/record-field/ui/form-types/components/FormAddressFieldInput';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { expect, fn, userEvent, within } from 'storybook/test';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
|
||||
const meta: Meta<typeof FormAddressFieldInput> = {
|
||||
|
|
@ -9,7 +8,7 @@ const meta: Meta<typeof FormAddressFieldInput> = {
|
|||
component: FormAddressFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|||
import { graphql, HttpResponse } from 'msw';
|
||||
import { expect, fn, userEvent, within } from 'storybook/test';
|
||||
import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { WorkflowStepActionDrawerDecorator } from '~/testing/decorators/WorkflowStepActionDrawerDecorator';
|
||||
|
|
@ -101,7 +100,6 @@ const meta: Meta<typeof FormAdvancedTextFieldInput> = {
|
|||
SnackBarDecorator,
|
||||
RouterDecorator,
|
||||
WorkspaceDecorator,
|
||||
I18nFrontDecorator,
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|||
import { expect, fn, userEvent, waitFor, within } from 'storybook/test';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { getCanvasElementForDropdownTesting } from 'twenty-ui/testing';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -12,7 +11,7 @@ const meta: Meta<typeof FormArrayFieldInput> = {
|
|||
component: FormArrayFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { FormBooleanFieldInput } from '@/object-record/record-field/ui/form-type
|
|||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { expect, fn, userEvent, waitFor, within } from 'storybook/test';
|
||||
import { getCanvasElementForDropdownTesting } from 'twenty-ui/testing';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -11,7 +10,7 @@ const meta: Meta<typeof FormBooleanFieldInput> = {
|
|||
component: FormBooleanFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { type FieldCurrencyValue } from '@/object-record/record-field/ui/types/F
|
|||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { expect, within } from 'storybook/test';
|
||||
import { CurrencyCode } from 'twenty-shared/constants';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -12,7 +11,7 @@ const meta: Meta<typeof FormCurrencyFieldInput> = {
|
|||
component: FormCurrencyFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { FormEmailsFieldInput } from '@/object-record/record-field/ui/form-types/components/FormEmailsFieldInput';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { expect, fn, userEvent, waitFor, within } from 'storybook/test';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -10,7 +9,7 @@ const meta: Meta<typeof FormEmailsFieldInput> = {
|
|||
component: FormEmailsFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { FormFullNameFieldInput } from '@/object-record/record-field/ui/form-types/components/FormFullNameFieldInput';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { expect, fn, userEvent, within } from 'storybook/test';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -10,7 +9,7 @@ const meta: Meta<typeof FormFullNameFieldInput> = {
|
|||
component: FormFullNameFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { FormLinksFieldInput } from '@/object-record/record-field/ui/form-types/components/FormLinksFieldInput';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { expect, fn, userEvent, within } from 'storybook/test';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
|
||||
const meta: Meta<typeof FormLinksFieldInput> = {
|
||||
|
|
@ -9,7 +8,7 @@ const meta: Meta<typeof FormLinksFieldInput> = {
|
|||
component: FormLinksFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { FormMultiSelectFieldInput } from '@/object-record/record-field/ui/form-types/components/FormMultiSelectFieldInput';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { expect, fn, userEvent, within } from 'storybook/test';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -10,7 +9,7 @@ const meta: Meta<typeof FormMultiSelectFieldInput> = {
|
|||
component: FormMultiSelectFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { expect, fn, userEvent, waitFor, within } from 'storybook/test';
|
|||
|
||||
import { FormPhoneFieldInput } from '@/object-record/record-field/ui/form-types/components/FormPhoneFieldInput';
|
||||
import { type FieldPhonesValue } from '@/object-record/record-field/ui/types/FieldMetadata';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -13,7 +12,7 @@ const meta: Meta<typeof FormPhoneFieldInput> = {
|
|||
component: FormPhoneFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { FormRawJsonFieldInput } from '@/object-record/record-field/ui/form-type
|
|||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { expect, fn, userEvent, waitFor, within } from 'storybook/test';
|
||||
import { getUserDevice } from 'twenty-ui/utilities';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -11,7 +10,7 @@ const meta: Meta<typeof FormRawJsonFieldInput> = {
|
|||
component: FormRawJsonFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import {
|
|||
within,
|
||||
} from 'storybook/test';
|
||||
import { getUserDevice } from 'twenty-ui/utilities';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -18,7 +17,7 @@ const meta: Meta<typeof FormRichTextV2FieldInput> = {
|
|||
component: FormRichTextV2FieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { FormSelectFieldInput } from '@/object-record/record-field/ui/form-types/components/FormSelectFieldInput';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { expect, fn, userEvent, within } from 'storybook/test';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -10,7 +9,7 @@ const meta: Meta<typeof FormSelectFieldInput> = {
|
|||
component: FormSelectFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|||
import { expect, fn, userEvent, within } from 'storybook/test';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { ComponentDecorator, RouterDecorator } from 'twenty-ui/testing';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
|
|
@ -20,7 +19,6 @@ const meta: Meta<typeof FormSingleRecordPicker> = {
|
|||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [
|
||||
I18nFrontDecorator,
|
||||
ObjectMetadataItemsDecorator,
|
||||
ComponentDecorator,
|
||||
WorkspaceDecorator,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import {
|
|||
within,
|
||||
} from 'storybook/test';
|
||||
import { getUserDevice } from 'twenty-ui/utilities';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -18,7 +17,7 @@ const meta: Meta<typeof FormTextFieldInput> = {
|
|||
component: FormTextFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { FormUuidFieldInput } from '@/object-record/record-field/ui/form-types/components/FormUuidFieldInput';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { expect, fn, userEvent, waitFor, within } from 'storybook/test';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
|
|
@ -10,7 +9,7 @@ const meta: Meta<typeof FormUuidFieldInput> = {
|
|||
component: FormUuidFieldInput,
|
||||
args: {},
|
||||
argTypes: {},
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
export default meta;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
import { VariableChip } from '@/object-record/record-field/ui/form-types/components/VariableChip';
|
||||
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
||||
import { expect, within } from 'storybook/test';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { WorkflowStepDecorator } from '~/testing/decorators/WorkflowStepDecorator';
|
||||
import { MOCKED_STEP_ID } from '~/testing/mock-data/workflow';
|
||||
|
||||
const meta: Meta<typeof VariableChip> = {
|
||||
title: 'UI/Data/Field/Form/Input/VariableChip',
|
||||
component: VariableChip,
|
||||
decorators: [WorkflowStepDecorator, I18nFrontDecorator],
|
||||
decorators: [WorkflowStepDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|||
|
||||
import { EmailsFieldDisplay } from '@/object-record/record-field/ui/meta-types/display/components/EmailsFieldDisplay';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { getFieldDecorator } from '~/testing/decorators/getFieldDecorator';
|
||||
|
|
@ -11,7 +10,6 @@ import { getProfilingStory } from '~/testing/profiling/utils/getProfilingStory';
|
|||
const meta: Meta = {
|
||||
title: 'UI/Data/Field/Display/EmailsFieldDisplay',
|
||||
decorators: [
|
||||
I18nFrontDecorator,
|
||||
MemoryRouterDecorator,
|
||||
getFieldDecorator('person', 'emails', {
|
||||
primaryEmail: 'test@test.com',
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import { FieldFocusContext } from '@/object-record/record-field/ui/contexts/Fiel
|
|||
import { FieldFocusContextProvider } from '@/object-record/record-field/ui/contexts/FieldFocusContextProvider';
|
||||
import { LinksFieldDisplay } from '@/object-record/record-field/ui/meta-types/display/components/LinksFieldDisplay';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { getFieldDecorator } from '~/testing/decorators/getFieldDecorator';
|
||||
|
|
@ -24,7 +23,6 @@ const FieldFocusEffect = () => {
|
|||
const meta: Meta = {
|
||||
title: 'UI/Data/Field/Display/LinksFieldDisplay',
|
||||
decorators: [
|
||||
I18nFrontDecorator,
|
||||
MemoryRouterDecorator,
|
||||
getFieldDecorator('company', 'domainName', {
|
||||
primaryLinkUrl: 'https://www.google.com',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|||
|
||||
import { PhonesFieldDisplay } from '@/object-record/record-field/ui/meta-types/display/components/PhonesFieldDisplay';
|
||||
import { ComponentDecorator } from 'twenty-ui/testing';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { MemoryRouterDecorator } from '~/testing/decorators/MemoryRouterDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
import { getFieldDecorator } from '~/testing/decorators/getFieldDecorator';
|
||||
|
|
@ -14,7 +13,6 @@ const meta: Meta = {
|
|||
MemoryRouterDecorator,
|
||||
getFieldDecorator('person', 'phones'),
|
||||
ComponentDecorator,
|
||||
I18nFrontDecorator,
|
||||
SnackBarDecorator,
|
||||
],
|
||||
component: PhonesFieldDisplay,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentTyp
|
|||
|
||||
import { ArrayFieldInput } from '@/object-record/record-field/ui/meta-types/input/components/ArrayFieldInput';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
|
||||
const { FieldInputEventContextProviderWithJestMocks } =
|
||||
getFieldInputEventContextProviderWithJestMocks();
|
||||
|
|
@ -102,7 +101,7 @@ const ArrayInputWithContext = ({
|
|||
const meta: Meta<typeof ArrayInputWithContext> = {
|
||||
title: 'UI/Input/ArrayFieldInput',
|
||||
component: ArrayInputWithContext,
|
||||
decorators: [I18nFrontDecorator],
|
||||
decorators: [],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import { BooleanFieldInput } from '@/object-record/record-field/ui/meta-types/in
|
|||
import { RecordFieldComponentInstanceContext } from '@/object-record/record-field/ui/states/contexts/RecordFieldComponentInstanceContext';
|
||||
import { RECORD_TABLE_CELL_INPUT_ID_PREFIX } from '@/object-record/record-table/constants/RecordTableCellInputIdPrefix';
|
||||
import { getRecordFieldInputInstanceId } from '@/object-record/utils/getRecordFieldInputId';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
|
||||
const { FieldInputEventContextProviderWithJestMocks, handleSubmitMocked } =
|
||||
getFieldInputEventContextProviderWithJestMocks();
|
||||
|
|
@ -85,7 +84,7 @@ const BooleanFieldInputWithContext = ({
|
|||
const meta: Meta = {
|
||||
title: 'UI/Data/Field/Input/BooleanFieldInput',
|
||||
component: BooleanFieldInputWithContext,
|
||||
decorators: [I18nFrontDecorator],
|
||||
decorators: [],
|
||||
args: {
|
||||
value: true,
|
||||
recordId: 'id-1',
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import { getRecordFieldInputInstanceId } from '@/object-record/utils/getRecordFi
|
|||
import { usePushFocusItemToFocusStack } from '@/ui/utilities/focus/hooks/usePushFocusItemToFocusStack';
|
||||
import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
||||
|
||||
const updateRecord = fn();
|
||||
|
|
@ -102,7 +101,7 @@ const EmailInputWithContext = ({
|
|||
const meta: Meta<typeof EmailInputWithContext> = {
|
||||
title: 'UI/Input/EmailsFieldInput',
|
||||
component: EmailInputWithContext,
|
||||
decorators: [SnackBarDecorator, I18nFrontDecorator],
|
||||
decorators: [SnackBarDecorator],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import { usePushFocusItemToFocusStack } from '@/ui/utilities/focus/hooks/usePush
|
|||
import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';
|
||||
import { getCanvasElementForDropdownTesting } from 'twenty-ui/testing';
|
||||
import { FieldMetadataType } from '~/generated-metadata/graphql';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
|
||||
const updateRecord = fn();
|
||||
|
||||
|
|
@ -122,7 +121,7 @@ const getPrimaryLinkBookmarkIcon = (canvasElement: HTMLElement) =>
|
|||
const meta: Meta = {
|
||||
title: 'UI/Data/Field/Input/LinksFieldInput',
|
||||
component: LinksInputWithContext,
|
||||
decorators: [I18nFrontDecorator],
|
||||
decorators: [],
|
||||
args: {
|
||||
value: {
|
||||
primaryLinkUrl: null,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import { RECORD_TABLE_CELL_INPUT_ID_PREFIX } from '@/object-record/record-table/
|
|||
import { getRecordFieldInputInstanceId } from '@/object-record/utils/getRecordFieldInputId';
|
||||
import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentType';
|
||||
import { StorybookFieldInputDropdownFocusIdSetterEffect } from '~/testing/components/StorybookFieldInputDropdownFocusIdSetterEffect';
|
||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||
|
||||
const {
|
||||
FieldInputEventContextProviderWithJestMocks,
|
||||
|
|
@ -147,7 +146,7 @@ const meta: Meta = {
|
|||
onTab: { control: false },
|
||||
onShiftTab: { control: false },
|
||||
},
|
||||
decorators: [clearMocksDecorator, SnackBarDecorator, I18nFrontDecorator],
|
||||
decorators: [clearMocksDecorator, SnackBarDecorator],
|
||||
parameters: {
|
||||
clearMocks: true,
|
||||
},
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue