level_0 int64 0 10k | index int64 0 0 | repo_id stringlengths 22 152 | file_path stringlengths 41 203 | content stringlengths 11 11.5M |
|---|---|---|---|---|
9,870 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/legacy/utils | petrpan-code/chakra-ui/chakra-ui/packages/legacy/utils/tests/lazy.test.ts | import { determineLazyBehavior } from "../src"
test("determineLazyBehavior", () => {
// when not lazy, tab panels are always rendered
expect(determineLazyBehavior({ isLazy: false })).toBe(true)
expect(determineLazyBehavior({ isLazy: false, isSelected: false })).toBe(true)
expect(determineLazyBehavior({ isLaz... |
9,871 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/legacy/utils | petrpan-code/chakra-ui/chakra-ui/packages/legacy/utils/tests/number.test.ts | import {
toPrecision,
countDecimalPlaces,
valueToPercent,
percentToValue,
roundValueToStep,
clampValue,
} from "../src"
test("should round number to specific precision", () => {
expect(toPrecision(1.4567, 2)).toStrictEqual("1.46")
})
test("should return number of decimal places", () => {
expect(countD... |
9,872 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/legacy/utils | petrpan-code/chakra-ui/chakra-ui/packages/legacy/utils/tests/object.test.ts | import {
omit,
pick,
split,
get,
memoize,
getWithDefault,
filterUndefined,
} from "../src/object"
const obj = { a: 1, b: 2, c: { d: 3 } }
test("should return object with omitted property", () => {
expect(omit(obj, ["a"])).toStrictEqual({ b: 2, c: { d: 3 } })
})
test("should return property in object ... |
9,873 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/legacy/utils | petrpan-code/chakra-ui/chakra-ui/packages/legacy/utils/tests/responsive.test.ts | import {
analyzeBreakpoints,
arrayToObjectNotation,
isResponsiveObjectLike,
mapResponsive,
objectToArrayNotation,
} from "../src"
const arr = [2, 3]
const obj = { sm: 2, md: 3 }
const mapper = (val: number) => `grid-template-columns(${val}, 1fr )`
test("should run mapper on array or object and return mapped... |
9,874 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/legacy/utils | petrpan-code/chakra-ui/chakra-ui/packages/legacy/utils/tests/walk-object.test.ts | import { walkObject } from "../src"
describe("walkObject", () => {
it("should handle an object", () => {
const target = {
key: "original",
nested: {
nestedKey: "nestedOriginal",
},
}
const replaceWith = "It's me"
const result = walkObject(target, () => replaceWith)
expe... |
9,905 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/utilities/lazy-utils | petrpan-code/chakra-ui/chakra-ui/packages/utilities/lazy-utils/tests/index.test.tsx | import { lazyDisclosure } from "../src"
test("lazyDisclosure", () => {
// when not lazy, tab panels are always rendered
expect(lazyDisclosure({ enabled: false })).toBe(true)
expect(lazyDisclosure({ enabled: false, isSelected: false })).toBe(true)
expect(lazyDisclosure({ enabled: false, wasSelected: false }))... |
9,911 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/utilities/merge-utils | petrpan-code/chakra-ui/chakra-ui/packages/utilities/merge-utils/tests/index.test.ts | import { mergeWith } from "../src"
describe("merge utils", () => {
test("should work", () => {
const result = mergeWith(
{ parts: ["a"], baseStyle: () => ({ bg: "red.200" }) },
{ parts: ["b"], baseStyle: () => ({ color: "pink", bg: "red.500" }) },
)
expect(result.baseStyle({})).toMatchInlineS... |
9,955 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils/tests/extend-theme.test.tsx | import { extendTheme, ThemeOverride } from "../src/extend-theme"
describe("extendTheme", () => {
it("should override a color", () => {
const testColor = "papayawhip"
const override = {
colors: {
blue: {
50: testColor,
},
},
}
const customTheme = extendTheme(over... |
9,956 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils/tests/theme-extension.test.tsx | import { extendTheme, mergeThemeOverride, ThemeOverride } from "../src"
describe("Theme Extension", () => {
it("should be backwards compatible", () => {
const theme = extendTheme({
colors: {
brand: {
500: "#b4d455",
},
},
})
expect(Object.keys(theme.components).leng... |
9,957 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils/tests/with-default-color-scheme.test.tsx | import { theme as defaultTheme } from "@chakra-ui/theme"
import { extendTheme, mergeThemeOverride, withDefaultColorScheme } from "../src"
describe("Theme extension: withDefaultColorScheme", () => {
it("should compose all extensions", () => {
const theme = extendTheme(
{
colors: {
brand: {... |
9,958 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils/tests/with-default-props.test.tsx | import { extendTheme, withDefaultProps } from "../src"
describe("Theme extension: withDefaultProps", () => {
it("should set a defaultProps", () => {
const customTheme = extendTheme(
withDefaultProps({
defaultProps: {
colorScheme: "brand",
size: "veryBig",
variant: "my-... |
9,959 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils/tests/with-default-size.test.tsx | import { extendTheme, withDefaultSize } from "../src"
describe("Theme extension: withDefaultSize", () => {
it("should set a defaultSize", () => {
const customTheme = extendTheme(withDefaultSize({ size: "veryBig" }))
expect(customTheme.components.Button.defaultProps.size).toBe("veryBig")
})
it("should a... |
9,960 | 0 | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils | petrpan-code/chakra-ui/chakra-ui/packages/utilities/theme-utils/tests/with-default-variant.test.tsx | import { extendTheme, withDefaultVariant } from "../src"
describe("Theme extension: withDefaultVariant", () => {
it("should set a defaultVariant", () => {
const customTheme = extendTheme(
withDefaultVariant({ variant: "my-custom-variant" }),
)
expect(customTheme.components.Button.defaultProps.vari... |
9,966 | 0 | petrpan-code/chakra-ui/chakra-ui/plop/component | petrpan-code/chakra-ui/chakra-ui/plop/component/tests/{{componentName}}.test.tsx.hbs | /**
* 📝 Notes for Contributors:
*
* - Ensure you write tests for component behavior defined in the hook.
* - Ensure you write tests for the accessibility and interactions.
* - No snapshot tests for components please! 🙂
*
* @see Testing-Guide https://chakra-ui.com/guides/component-guide#4-build-and-test
*/
... |
9,973 | 0 | petrpan-code/chakra-ui/chakra-ui | petrpan-code/chakra-ui/chakra-ui/scripts/setup-test.ts | import "@testing-library/jest-dom"
import React from "react"
global.React = React
const { getComputedStyle } = window
window.getComputedStyle = (elt) => getComputedStyle(elt)
window.Element.prototype.scrollTo = () => {}
window.scrollTo = () => {}
if (typeof window.matchMedia !== "function") {
Object.defineProperty... |
6 | 0 | petrpan-code/chakra-ui/chakra-ui/tooling/cli | petrpan-code/chakra-ui/chakra-ui/tooling/cli/test/extract-component-types.test.ts | import { extractComponentTypes } from "../src/command/tokens/extract-component-types"
describe("Extract Component Types", () => {
it("should extract all component types", () => {
const theme = {
components: {
TestComponent: {
variants: {
outline: {},
unstyled: {},
... |
7 | 0 | petrpan-code/chakra-ui/chakra-ui/tooling/cli | petrpan-code/chakra-ui/chakra-ui/tooling/cli/test/extract-property-keys.test.ts | import { extractPropertyKeys } from "../src/command/tokens/extract-property-keys"
describe("Extract Property Keys", () => {
it("should extract top-level keys from the given property", () => {
const theme = {
textStyles: {
styleOne: {
fontSize: 16,
fontWeight: "bold",
},
... |
8 | 0 | petrpan-code/chakra-ui/chakra-ui/tooling/cli | petrpan-code/chakra-ui/chakra-ui/tooling/cli/test/extract-property-paths.test.ts | import {
extractPropertyPaths,
printUnionMap,
} from "../src/command/tokens/extract-property-paths"
describe("Extract Property Paths", () => {
const target = {
1: {
11: {
111: "",
112: "",
},
12: {
121: "",
122: "",
123: {
231: "",
... |
9 | 0 | petrpan-code/chakra-ui/chakra-ui/tooling/cli | petrpan-code/chakra-ui/chakra-ui/tooling/cli/test/extract-semantic-token-keys.test.ts | import { extractSemanticTokenKeys } from "../src/command/tokens/extract-semantic-token-keys"
describe("Extract Semantic Token Keys", () => {
it("should extract semantic token keys from the given property", () => {
const theme = {
colors: {
green: {
500: "#38A169",
},
red: ... |
10 | 0 | petrpan-code/chakra-ui/chakra-ui/tooling/cli | petrpan-code/chakra-ui/chakra-ui/tooling/cli/test/format-with-prettier.test.ts | import { formatWithPrettier } from "../src/utils/format-with-prettier"
describe("Format With Prettier", () => {
it("should format with prettier", async () => {
const content =
"export interface ThemeTypings { fonts: 'test1'|'test2'|'test3'}"
const pretty = await formatWithPrettier(content)
expect... |
11 | 0 | petrpan-code/chakra-ui/chakra-ui/tooling/cli | petrpan-code/chakra-ui/chakra-ui/tooling/cli/test/theme-typings.test.ts | import { createThemeTypingsInterface } from "../src/command/tokens/create-theme-typings-interface"
import { themeKeyConfiguration } from "../src/command/tokens/config"
const defaultRecord = {
sm: "",
md: "",
}
const smallTheme: Record<string, unknown> = {
colors: {
niceColor: "",
suchWowColor: "",
o... |
25 | 0 | petrpan-code/chakra-ui/chakra-ui/tooling/cra-template-typescript/template | petrpan-code/chakra-ui/chakra-ui/tooling/cra-template-typescript/template/src/App.test.tsx | import React from "react"
import { screen } from "@testing-library/react"
import { render } from "./test-utils"
import { App } from "./App"
test("renders learn react link", () => {
render(<App />)
const linkElement = screen.getByText(/learn chakra/i)
expect(linkElement).toBeInTheDocument()
})
|
1,147 | 0 | petrpan-code/jaredpalmer/formik | petrpan-code/jaredpalmer/formik/e2e/basic.test.ts | import { test, expect } from '@playwright/test';
test('should validate before submit', async ({ page }) => {
await page.goto('/basic');
// Submit the form
await page.click('button[type=submit]');
// Check that all fields are touched and error messages work
expect(await page.textContent('input[name="firstNa... |
1,206 | 0 | petrpan-code/jaredpalmer/formik/packages/formik-native | petrpan-code/jaredpalmer/formik/packages/formik-native/test/blah.test.ts | describe('blah', () => {
it('works', () => {
expect(1).toEqual(1);
});
});
|
1,224 | 0 | petrpan-code/jaredpalmer/formik/packages/formik | petrpan-code/jaredpalmer/formik/packages/formik/test/ErrorMessage.test.tsx | import * as React from 'react';
import { act, render } from '@testing-library/react';
import { Formik, FormikProps, ErrorMessage } from '../src';
import { noop } from './testHelpers';
interface TestFormValues {
name: string;
email: string;
}
const TestForm: React.FC<any> = p => (
<Formik
onSubmit={noop}
... |
1,225 | 0 | petrpan-code/jaredpalmer/formik/packages/formik | petrpan-code/jaredpalmer/formik/packages/formik/test/Field.test.tsx | import * as React from 'react';
import {
act,
cleanup,
render,
waitFor,
fireEvent,
} from '@testing-library/react';
import * as Yup from 'yup';
import {
Formik,
Field,
FastField,
FieldProps,
FieldConfig,
FormikProps,
FormikConfig,
} from '../src';
import { noop } from './testHelpers';
const in... |
1,226 | 0 | petrpan-code/jaredpalmer/formik/packages/formik | petrpan-code/jaredpalmer/formik/packages/formik/test/FieldArray.test.tsx | import { act, fireEvent, render, screen } from '@testing-library/react';
import * as React from 'react';
import * as Yup from 'yup';
import { FieldArray, FieldArrayRenderProps, Formik, isFunction } from '../src';
const noop = () => {};
const TestForm: React.FC<any> = p => (
<Formik
onSubmit={noop}
initialV... |
1,227 | 0 | petrpan-code/jaredpalmer/formik/packages/formik | petrpan-code/jaredpalmer/formik/packages/formik/test/Formik.test.tsx | import * as React from 'react';
import {
act,
fireEvent,
render,
screen,
waitFor,
} from '@testing-library/react';
import * as Yup from 'yup';
import {
Formik,
FormikConfig,
FormikProps,
FormikValues,
prepareDataForValidation,
} from '../src';
import { noop } from './testHelpers';
jest.spyOn(globa... |
1,230 | 0 | petrpan-code/jaredpalmer/formik/packages/formik | petrpan-code/jaredpalmer/formik/packages/formik/test/tsconfig.json | {
// Hack to fix https://github.com/formium/tsdx/issues/84#issuecomment-489690504
"extends": "../../../tsconfig.json",
"include": ["."]
}
|
1,231 | 0 | petrpan-code/jaredpalmer/formik/packages/formik | petrpan-code/jaredpalmer/formik/packages/formik/test/types.test.tsx | import { FormikTouched, FormikErrors } from '../src';
describe('Formik Types', () => {
describe('FormikTouched', () => {
type Values = {
id: string;
social: {
facebook: string;
};
};
it('it should infer nested object structure of touched property from Values', () => {
con... |
1,232 | 0 | petrpan-code/jaredpalmer/formik/packages/formik | petrpan-code/jaredpalmer/formik/packages/formik/test/utils.test.tsx | import {
isEmptyArray,
setIn,
getIn,
setNestedObjectValues,
isPromise,
getActiveElement,
isNaN,
} from '../src/utils';
describe('utils', () => {
describe('isEmptyArray', () => {
it('returns true when an empty array is passed in', () => {
expect(isEmptyArray([])).toBe(true);
});
it('re... |
1,233 | 0 | petrpan-code/jaredpalmer/formik/packages/formik | petrpan-code/jaredpalmer/formik/packages/formik/test/withFormik.test.tsx | import * as React from 'react';
import { act, render, waitFor } from '@testing-library/react';
import * as Yup from 'yup';
import { withFormik, FormikProps } from '../src';
import { noop } from './testHelpers';
interface Values {
name: string;
}
const Form: React.FC<FormikProps<Values>> = ({
values,
handleSubm... |
1,234 | 0 | petrpan-code/jaredpalmer/formik/packages/formik | petrpan-code/jaredpalmer/formik/packages/formik/test/yupHelpers.test.ts | import * as Yup from 'yup';
import { validateYupSchema, yupToFormErrors } from '../src';
const schema = Yup.object().shape({
name: Yup.string().required('required'),
field: Yup.string(),
});
const nestedSchema = Yup.object().shape({
object: Yup.object().shape({
nestedField: Yup.string(),
nestedArray: Yu... |
1,577 | 0 | petrpan-code/jaredpalmer/after.js/packages/after.js | petrpan-code/jaredpalmer/after.js/packages/after.js/test/errorPage.test.tsx | import { vi } from 'vitest';
import { render as renderPage } from '../src';
import { Helmet } from 'react-helmet';
import Home from './components/Home';
import NonAsyncRedirect from './components/NonAsyncRedirectComponent';
import AsyncRedirectComponent from './components/AsyncRedirectComponent';
import UserDefined40... |
1,578 | 0 | petrpan-code/jaredpalmer/after.js/packages/after.js | petrpan-code/jaredpalmer/after.js/packages/after.js/test/getAssets.test.tsx | import { vi } from 'vitest';
import {
getAssets as getRouteChunks,
errorMeesage,
AsyncRouteProps,
asyncComponent,
} from '../src';
import chunks from './chunks';
import routes from './routes';
import { matchPath } from 'react-router-dom';
// @ts-ignore
import logger from 'razzle-dev-utils/logger';
function g... |
1,579 | 0 | petrpan-code/jaredpalmer/after.js/packages/after.js | petrpan-code/jaredpalmer/after.js/packages/after.js/test/loadInitialProps.test.tsx | import { loadInitialProps } from '../src';
import routes from './routes';
import { createMemoryHistory } from 'history';
import { History } from 'history';
describe('loadInitialProps', () => {
let history: History;
beforeEach(() => {
history = createMemoryHistory();
});
it('should find matched component ... |
1,660 | 0 | petrpan-code/jaredpalmer/react-fns/src/Network | petrpan-code/jaredpalmer/react-fns/src/Network/__tests__/Network.test.tsx | import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Network } from '../';
describe('<Network />', () => {
describe('<Network render />', () => {
const node = document.createElement('div');
afterEach(() => {
ReactDOM.unmountComponentAtNode(node);
});
it('receives {... |
1,661 | 0 | petrpan-code/jaredpalmer/react-fns/src/Network | petrpan-code/jaredpalmer/react-fns/src/Network/__tests__/withNetwork.test.tsx | import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { withNetwork } from '../';
describe('withNetwork()', () => {
const node = document.createElement('div');
afterEach(() => {
ReactDOM.unmountComponentAtNode(node);
});
it('receives { online } props', () => {
const hello = '... |
1,665 | 0 | petrpan-code/jaredpalmer/react-fns/src/Scroll | petrpan-code/jaredpalmer/react-fns/src/Scroll/__tests__/Scroll.test.tsx | import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Scroll } from '../Scroll';
describe('<Scroll />', () => {
describe('<Scroll render />', () => {
const node = document.createElement('div');
afterEach(() => {
ReactDOM.unmountComponentAtNode(node);
});
it('receive... |
1,666 | 0 | petrpan-code/jaredpalmer/react-fns/src/Scroll | petrpan-code/jaredpalmer/react-fns/src/Scroll/__tests__/withScroll.test.tsx | import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { withScroll } from '../';
describe('withScroll()', () => {
const node = document.createElement('div');
afterEach(() => {
ReactDOM.unmountComponentAtNode(node);
});
it('receives { x, y } props', () => {
const hello = 'hi';... |
1,670 | 0 | petrpan-code/jaredpalmer/react-fns/src/WindowSize | petrpan-code/jaredpalmer/react-fns/src/WindowSize/__tests__/WindowSize.test.tsx | import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { WindowSize } from '../WindowSize';
describe('<WindowSize />', () => {
describe('<WindowSize render />', () => {
const node = document.createElement('div');
afterEach(() => {
ReactDOM.unmountComponentAtNode(node);
});
... |
1,671 | 0 | petrpan-code/jaredpalmer/react-fns/src/WindowSize | petrpan-code/jaredpalmer/react-fns/src/WindowSize/__tests__/withWindowSize.test.tsx | import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { withWindowSize } from '../withWindowSize';
describe('withScroll()', () => {
const node = document.createElement('div');
afterEach(() => {
ReactDOM.unmountComponentAtNode(node);
});
it('receives { width, height } props', () =... |
4,463 | 0 | petrpan-code/novuhq/novu/packages/application-generic/src/usecases | petrpan-code/novuhq/novu/packages/application-generic/src/usecases/get-feature-flag/get-feature-flag.test.ts | import {
GetIsApiRateLimitingEnabled,
GetIsTemplateStoreEnabled,
GetIsTopicNotificationEnabled,
} from './index';
import { FeatureFlagCommand } from './get-feature-flag.command';
import { FeatureFlagsService } from '../../services';
const originalLaunchDarklySdkKey = process.env.LAUNCH_DARKLY_SDK_KEY;
describe(... |
4,469 | 0 | petrpan-code/novuhq/novu/packages/application-generic/src/usecases | petrpan-code/novuhq/novu/packages/application-generic/src/usecases/get-feature-flag/get-system-critical-flag.test.ts | import { GetIsInMemoryClusterModeEnabled } from './index';
describe('Get System Critical Flag', () => {
describe('SystemCriticalFlagEnum.IS_IN_MEMORY_CLUSTER_MODE_ENABLED', () => {
it('should return default hardcoded value when no environment variable is set', async () => {
// TODO: Temporary coexistence t... |
4,592 | 0 | petrpan-code/novuhq/novu/packages/headless/src | petrpan-code/novuhq/novu/packages/headless/src/lib/headless.service.test.ts | import {
ApiService,
IUserGlobalPreferenceSettings,
IUserPreferenceSettings,
} from '@novu/client';
import { WebSocketEventEnum } from '@novu/shared';
import io from 'socket.io-client';
import {
ChannelCTATypeEnum,
ChannelTypeEnum,
IMessage,
IOrganizationEntity,
ButtonTypeEnum,
MessageActionStatusEnu... |
4,713 | 0 | petrpan-code/novuhq/novu/packages/notification-center | petrpan-code/novuhq/novu/packages/notification-center/src/index.test.ts | import {
IStoreQuery,
IUserPreferenceSettings,
IPreferenceChannels,
ScreensEnum,
ColorScheme,
IMessage,
ChannelTypeEnum,
IMessageCTA,
IActor,
ActorTypeEnum,
ChannelCTATypeEnum,
IMessageAction,
MessageActionStatusEnum,
IMessageButton,
ButtonTypeEnum,
} from './index';
describe('@novu/notif... |
4,751 | 0 | petrpan-code/novuhq/novu/packages/notification-center/src/components | petrpan-code/novuhq/novu/packages/notification-center/src/components/novu-provider/NovuProvider.test.tsx | /* cSpell:disable */
import React from 'react';
import { configure, fireEvent, render, screen, waitFor } from '@testing-library/react';
import '@testing-library/jest-dom';
import {
ChannelCTATypeEnum,
ChannelTypeEnum,
IMessage,
IOrganizationEntity,
ButtonTypeEnum,
MessageActionStatusEnum,
IPaginatedRespon... |
4,774 | 0 | petrpan-code/novuhq/novu/packages/notification-center/src | petrpan-code/novuhq/novu/packages/notification-center/src/hooks/useNotifications.test.tsx | import React, { useEffect, useState } from 'react';
import { act, renderHook, RenderHookResult } from '@testing-library/react-hooks';
import {
ChannelCTATypeEnum,
ChannelTypeEnum,
IMessage,
IOrganizationEntity,
ButtonTypeEnum,
MessageActionStatusEnum,
IPaginatedResponse,
} from '@novu/shared';
import { IU... |
4,918 | 0 | petrpan-code/novuhq/novu/packages/notification-center/src | petrpan-code/novuhq/novu/packages/notification-center/src/utils/pagination.test.ts | import { getNextPageParam } from './pagination';
describe('getNextPageParam', () => {
it.each`
totalCount | pageSize | page | nextPage | hasMore
${50} | ${10} | ${0} | ${1} | ${true}
${50} | ${10} | ${1} | ${2} | ${true}
${50} | ${10} | ${2} | ${3} ... |
6,909 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/ast | petrpan-code/appsmithorg/appsmith/app/client/packages/ast/src/index.test.ts | import { parseJSObject } from "../index";
import {
extractIdentifierInfoFromCode,
getMemberExpressionObjectFromProperty,
isFunctionPresent,
} from "../src/index";
describe("getAllIdentifiers", () => {
it("works properly", () => {
const cases: Array<{
script: string;
expectedResults: string[];
... |
6,912 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/ast/src | petrpan-code/appsmithorg/appsmith/app/client/packages/ast/src/actionCreator/index.test.ts | import {
getFuncExpressionAtPosition,
setCallbackFunctionField,
getActionBlocks,
getFunctionBodyStatements,
getFunctionName,
getMainAction,
getThenCatchBlocksFromQuery,
setThenBlockInQuery,
setCatchBlockInQuery,
setTextArgumentAtPosition,
getEnumArgumentAtPosition,
canTranslateToUI,
} from "./in... |
6,917 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/ast/src | petrpan-code/appsmithorg/appsmith/app/client/packages/ast/src/peekOverlay/index.test.ts | import { SourceType } from "../constants/ast";
import { PeekOverlayExpressionIdentifier } from "./index";
describe("extractExpressionAtPositionWholeDoc", () => {
const scriptIdentifier = new PeekOverlayExpressionIdentifier({
sourceType: SourceType.script,
});
const jsObjectIdentifier = new PeekOverlayExpres... |
7,006 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/theming/src/color | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/theming/src/color/tests/DarkModeTheme.test.ts | import { DarkModeTheme } from "../src/DarkModeTheme";
describe("bg color", () => {
it("should return correct color when chroma < 0.04", () => {
const { bg } = new DarkModeTheme("oklch(0.92 0.02 110)").getColors();
expect(bg).toBe("rgb(4.3484% 4.3484% 4.3484%)");
});
it("should return correct color when ... |
7,007 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/theming/src/color | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/theming/src/color/tests/LightModeTheme.test.ts | import { LightModeTheme } from "../src/LightModeTheme";
describe("bg color", () => {
it("should return correct color when lightness > 0.93", () => {
const { bg } = new LightModeTheme("oklch(0.95 0.09 231)").getColors();
expect(bg).toBe("rgb(84.831% 87.516% 88.974%)");
});
it("should return correct color... |
7,494 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/Button | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/Button/tests/Button.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import type { ComponentProps } from "react";
import { render, screen } from "@testing-library/react";
import { Button } from "../";
// Adapted from remixicon-react/EmotionHappyLineIcon (https://github.com/Remix-Design/RemixIcon/blob/f88a51b6402562c6c2465f... |
7,503 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/ButtonGroup | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/ButtonGroup/tests/ButtonGroup.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import { render, screen } from "@testing-library/react";
import { ButtonGroup, ButtonGroupItem } from "../";
import type { ButtonGroupProps } from "../";
const renderComponent = (props: ButtonGroupProps = {}) => {
return render(
<ButtonGroup {...pro... |
7,510 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/Checkbox | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/Checkbox/tests/Checkbox.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import type { ComponentProps } from "react";
import { Checkbox } from "@design-system/widgets";
import userEvent from "@testing-library/user-event";
import { render, screen } from "@testing-library/react";
// Adapted from remixicon-react/EmotionHappyLineIc... |
7,516 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/CheckboxGroup | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/CheckboxGroup/tests/CheckboxGroup.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import userEvent from "@testing-library/user-event";
import { render, screen } from "@testing-library/react";
import { CheckboxGroup } from "../";
import { Checkbox } from "../../Checkbox";
describe("@design-system/widgets/CheckboxGroup", () => {
it("sh... |
7,559 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/RadioGroup | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/RadioGroup/tests/RadioGroup.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import userEvent from "@testing-library/user-event";
import { render, screen } from "@testing-library/react";
import { RadioGroup } from "../";
import { Radio } from "../../Radio";
describe("@design-system/widgets/RadioGroup", () => {
it("should render ... |
7,579 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/Text | petrpan-code/appsmithorg/appsmith/app/client/packages/design-system/widgets/src/components/Text/tests/Text.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import { render, screen } from "@testing-library/react";
import { Text } from "../";
describe("@design-system/widgets/Text", () => {
it("should render the text", () => {
render(<Text>My Text</Text>);
expect(screen.getByText("My Text")).toBeInTh... |
7,629 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/dsl | petrpan-code/appsmithorg/appsmith/app/client/packages/dsl/src/index.test.ts | import { nestDSL, flattenDSL } from "./DSL";
import { ROOT_CONTAINER_WIDGET_ID } from "./constants";
describe("Test #1 - Check export types & constant values", () => {
it("nestDSL is a function", () => {
expect(typeof nestDSL).toBe("function");
});
it("flattenDSL is a function", () => {
expect(typeof fl... |
7,656 | 0 | petrpan-code/appsmithorg/appsmith/app/client/packages/rts/src | petrpan-code/appsmithorg/appsmith/app/client/packages/rts/src/test/server.test.ts | import app, { RTS_BASE_API_PATH } from "../server";
import supertest from "supertest";
const singleScript = {
script:
"(function abc() { let Api2 = { }; return Api2.data ? str.data + Api1.data : [] })()",
};
const multipleScripts = {
scripts: [
"(function abc() { return Api1.data })() ",
"(function ab... |
7,720 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators/GSheets/index.test.ts | import { DatasourceConnectionMode } from "entities/Datasource";
import GSheets from ".";
describe("GSheets WidgetQueryGenerator", () => {
const initialValues = {
actionConfiguration: {
formData: {
entityType: {
data: "ROWS",
},
tableHeaderIndex: {
data: "1",
... |
7,722 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators/MSSQL/index.test.ts | import { DatasourceConnectionMode } from "entities/Datasource";
import MSSQL from ".";
describe("MSSQL WidgetQueryGenerator", () => {
const initialValues = {
actionConfiguration: {
pluginSpecifiedTemplates: [{ value: true }],
},
};
test("should build select form data correctly", () => {
const e... |
7,724 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators/MongoDB/index.test.ts | import { DatasourceConnectionMode } from "entities/Datasource";
import MongoDB from ".";
describe("Mongo WidgetQueryGenerator", () => {
const initialValues = {
actionConfiguration: {
formData: {
command: { data: "FIND" },
aggregate: { limit: { data: "10" } },
delete: { limit: { data... |
7,726 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators/MySQL/index.test.ts | import { DatasourceConnectionMode } from "entities/Datasource";
import MySQl from ".";
describe("MySQl WidgetQueryGenerator", () => {
const initialValues = {
actionConfiguration: {
pluginSpecifiedTemplates: [{ value: true }],
},
};
test("should build select form data correctly", () => {
const e... |
7,728 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators/PostgreSQL/index.test.ts | import { DatasourceConnectionMode } from "entities/Datasource";
import PostgreSQL from ".";
describe("PostgreSQL WidgetQueryGenerator", () => {
const initialValues = {
actionConfiguration: {
pluginSpecifiedTemplates: [{ value: true }],
},
};
test("should build select form data correctly", () => {
... |
7,730 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators | petrpan-code/appsmithorg/appsmith/app/client/src/WidgetQueryGenerators/Snowflake/index.test.ts | import { DatasourceConnectionMode } from "entities/Datasource";
import Snowflake from ".";
describe("Snowflake WidgetQueryGenerator", () => {
const initialValues = {
actionConfiguration: {
pluginSpecifiedTemplates: [{ value: true }],
},
};
test("should build select form data correctly", () => {
... |
9,344 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/ce | petrpan-code/appsmithorg/appsmith/app/client/src/ce/api/ApiUtils.test.ts | import {
apiRequestInterceptor,
apiSuccessResponseInterceptor,
apiFailureResponseInterceptor,
axiosConnectionAbortedCode,
} from "./ApiUtils";
import type { AxiosRequestConfig, AxiosResponse } from "axios";
import type { ActionExecutionResponse } from "api/ActionAPI";
import {
createMessage,
ERROR_0,
SERV... |
9,370 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/ce | petrpan-code/appsmithorg/appsmith/app/client/src/ce/constants/messages.test.ts | import {
ARE_YOU_SURE,
CANNOT_MERGE_DUE_TO_UNCOMMITTED_CHANGES,
CANNOT_PULL_WITH_LOCAL_UNCOMMITTED_CHANGES,
CHANGES_ONLY_MIGRATION,
CHANGES_ONLY_USER,
CHANGES_USER_AND_MIGRATION,
COMMIT_AND_PUSH,
COMMIT_CHANGES,
COMMIT_TO,
COMMITTING_AND_PUSHING_CHANGES,
CONNECT_BTN_LABEL,
CONNECT_GIT,
CONNECT... |
9,377 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/ce/entities | petrpan-code/appsmithorg/appsmith/app/client/src/ce/entities/DataTree/dataTreeJSAction.test.ts | import { PluginType } from "entities/Action";
import { generateDataTreeJSAction } from "./dataTreeJSAction";
import type { JSCollectionData } from "reducers/entityReducers/jsActionsReducer";
describe("generateDataTreeJSAction", () => {
it("generate js collection in data tree", () => {
const jsCollection: JSColle... |
9,384 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/ce/entities | petrpan-code/appsmithorg/appsmith/app/client/src/ce/entities/URLRedirect/URLAssembly.test.ts | import urlBuilder, {
URLBuilder,
getQueryStringfromObject,
} from "./URLAssembly";
import { APP_MODE } from "entities/App";
describe("URLBuilder", () => {
beforeEach(() => {
// Reset the URLBuilder instance before each test
urlBuilder.resetURLParams();
});
it("should correctly set and use currentPag... |
9,416 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/ce/pages/Editor | petrpan-code/appsmithorg/appsmith/app/client/src/ce/pages/Editor/Explorer/helpers.test.ts | import {
getActionIdFromURL,
getJSCollectionIdFromURL,
} from "@appsmith/pages/Editor/Explorer/helpers";
describe("getActionIdFromUrl", () => {
it("getsApiId", () => {
window.history.pushState(
{},
"Api",
"/app/applicationSlugName/pageSlugName-pageId/edit/api/apiId",
);
const respon... |
9,494 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/ce/utils | petrpan-code/appsmithorg/appsmith/app/client/src/ce/utils/autocomplete/EntityDefinitions.test.ts | import { PluginType } from "entities/Action";
import type { JSCollectionData } from "reducers/entityReducers/jsActionsReducer";
import { getPropsForJSActionEntity } from "@appsmith/utils/autocomplete/EntityDefinitions";
const jsObject: JSCollectionData = {
isLoading: false,
config: {
id: "1234",
applicatio... |
9,501 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/ce/workers | petrpan-code/appsmithorg/appsmith/app/client/src/ce/workers/Evaluation/evaluationUtils.test.ts | import type { DependencyMap, EvaluationError } from "utils/DynamicBindingUtils";
import { PropertyEvaluationErrorType } from "utils/DynamicBindingUtils";
import { RenderModes } from "constants/WidgetConstants";
import { ValidationTypes } from "constants/WidgetValidation";
import type {
WidgetEntity,
WidgetEntityCo... |
9,505 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/ce/workers/Evaluation | petrpan-code/appsmithorg/appsmith/app/client/src/ce/workers/Evaluation/__tests__/dataTreeUtils.test.ts | import type { DataTree } from "entities/DataTree/dataTreeTypes";
import { makeEntityConfigsAsObjProperties } from "@appsmith/workers/Evaluation/dataTreeUtils";
import { smallDataSet } from "workers/Evaluation/__tests__/generateOpimisedUpdates.test";
import produce from "immer";
import { cloneDeep } from "lodash";
cons... |
9,546 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/AutoResizeTextArea.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import "jest-styled-components";
import renderer from "react-test-renderer";
import AutoResizeTextArea from "./AutoResizeTextArea";
describe("<AutoResizeTextArea />", () => {
describe("when autoResize is true", () => {
it("it should render a proxy te... |
9,556 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/EditorContextProvider.test.tsx | import React, { useContext } from "react";
import store from "store";
import TestRenderer from "react-test-renderer";
import { Provider } from "react-redux";
import type { EditorContextType } from "./EditorContextProvider";
import EditorContextProvider, { EditorContext } from "./EditorContextProvider";
interface Test... |
9,584 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/utils.test.ts | import { JSResponseState } from "./JSResponseView";
import { getJSResponseViewState } from "./utils";
const TEST_JS_FUNCTION_ID = "627ccff468e1fa5185b7f901";
const TEST_JS_FUNCTION = {
id: TEST_JS_FUNCTION_ID,
applicationId: "627aaf637e9e9b75e43ad2ff",
workspaceId: "61e52bb4847aa804d79fc7c1",
pluginType: "JS",... |
9,591 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator/utils.test.ts | import { EMPTY_BINDING_WITH_EMPTY_OBJECT } from "./constants";
jest.mock("sagas/ActionExecution/NavigateActionSaga", () => ({
__esModule: true,
default: "",
NavigationTargetType: { SAME_WINDOW: "" },
}));
import {
argsStringToArray,
enumTypeSetter,
enumTypeGetter,
JSToString,
modalGetter,
modalSette... |
9,593 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator/Field/Field.test.tsx | import { render, screen } from "test/testUtils";
import "@testing-library/jest-dom";
import React from "react";
import { ThemeProvider } from "styled-components";
import { Field } from "./index";
import { lightTheme } from "selectors/themeSelectors";
import { FieldType } from "../constants";
import { FIELD_CONFIG } fro... |
9,596 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator/FieldGroup/FieldGroupConfig.test.ts | import { FIELD_GROUP_CONFIG } from "./FieldGroupConfig";
import { AppsmithFunction, FieldType } from "../constants";
describe("Test Field Group Config", () => {
const cases = [
{
index: 0,
input: AppsmithFunction.none,
expectedLabel: "No action",
expectedFields: [],
},
{
ind... |
9,601 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator/viewComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator/viewComponents/Action/ActionTree.test.tsx | import React from "react";
import { Provider } from "react-redux";
import { testStore } from "store";
import { ThemeProvider } from "styled-components";
import { lightTheme } from "selectors/themeSelectors";
import { render } from "@testing-library/react";
import ActionTree from "./ActionTree";
import type { TActionBlo... |
9,607 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator/viewComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator/viewComponents/SelectorView/SelectorView.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import { render, screen } from "test/testUtils";
import type { SelectorViewProps } from "../../types";
import { SelectorView } from "./index";
describe("Selector view component", () => {
const props: SelectorViewProps = {
options: [
{
l... |
9,609 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator/viewComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator/viewComponents/TabView/TabView.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import { render, screen } from "test/testUtils";
import { TabView } from "./index";
import type { TabViewProps } from "../../types";
describe("Tab View component", () => {
const props: TabViewProps = {
label: "Type",
activeObj: {
id: "page-... |
9,611 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator/viewComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/ActionCreator/viewComponents/TextView/TextView.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import { render, screen } from "test/testUtils";
import { TextView } from "./index";
import type { TextViewProps } from "../../types";
describe("Text view component", () => {
const props: TextViewProps = {
label: "Key",
value: "{{storeValue(,'1')... |
9,617 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/CodeEditor/BindingPromptHelper.test.ts | import { showBindingPrompt } from "./BindingPromptHelper";
describe("Test to check conditons for showing binding prompt", () => {
it("Show binding prompt", () => {
const testCases = [
{ showEvaluatedValue: true, inputValue: "{" },
{ showEvaluatedValue: true, inputValue: "Some value" },
{ showEv... |
9,619 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/CodeEditor/CodeEditor.test.tsx | import CodeEditor from "./index";
import store from "store";
import TestRenderer from "react-test-renderer";
import React from "react";
import { Provider } from "react-redux";
import EvaluatedValuePopup from "./EvaluatedValuePopup";
import { ThemeProvider } from "styled-components";
import { theme, light } from "const... |
9,621 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.test.tsx | import store from "store";
import React from "react";
import { ThemeProvider } from "styled-components";
import { Provider } from "react-redux";
import { render, screen } from "@testing-library/react";
import EvaluatedValuePopup from "./EvaluatedValuePopup";
import { theme } from "constants/DefaultTheme";
import { Edi... |
9,625 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/CodeEditor/codeEditorUtils.test.ts | import {
removeNewLineChars,
getInputValue,
removeNewLineCharsIfRequired,
} from "./codeEditorUtils";
import { EditorSize } from "./EditorConfig";
describe("remove new line code", () => {
it("removed new lines", () => {
const input = `ab\ncd`;
const output = "abcd";
expect(removeNewLineChars(input)... |
9,630 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/CodeEditor/hintHelpers.test.ts | import {
bindingHintHelper,
SqlHintHelper,
} from "components/editorComponents/CodeEditor/hintHelpers";
import { MockCodemirrorEditor } from "../../../../test/__mocks__/CodeMirrorEditorMock";
import { random } from "lodash";
import "codemirror/addon/hint/sql-hint";
import { MAX_NUMBER_OF_SQL_HINTS } from "./utils/s... |
9,632 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/CodeEditor/index.test.tsx | import React from "react";
import { Provider } from "react-redux";
import { ThemeProvider } from "styled-components";
import "@testing-library/jest-dom";
import { render, screen } from "@testing-library/react";
import { lightTheme } from "selectors/themeSelectors";
import userEvent from "@testing-library/user-event";
... |
9,634 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/CodeEditor/lintHelpers.test.ts | import { Severity } from "entities/AppsmithConsole";
import type { LintError } from "utils/DynamicBindingUtils";
import { PropertyEvaluationErrorType } from "utils/DynamicBindingUtils";
import {
INVALID_JSOBJECT_START_STATEMENT,
INVALID_JSOBJECT_START_STATEMENT_ERROR_CODE,
} from "plugins/Linting/constants";
import... |
9,650 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/CodeEditor | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/CodeEditor/utils/codeComments.test.ts | import CodeMirror from "codemirror";
import "components/editorComponents/CodeEditor/modes";
import "codemirror/addon/comment/comment";
import { EditorModes } from "../EditorConfig";
import { handleCodeComment } from "./codeComment";
const JS_LINE_COMMENT = "//";
const SQL_LINE_COMMENT = "--";
describe("handleCodeComm... |
9,672 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/Debugger/helpers.test.ts | import type { DependencyMap } from "utils/DynamicBindingUtils";
import {
getDependenciesFromInverseDependencies,
getDependencyChain,
} from "./helpers";
describe("getDependencies", () => {
it("Check if getDependencies returns in a correct format", () => {
const input = {
"Button1.text": ["Input1.defaul... |
9,688 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/GlobalSearch/GlobalSearchHooks.test.ts | import { useFilteredAndSortedFileOperations } from "./GlobalSearchHooks";
import type { Datasource } from "entities/Datasource";
import { SEARCH_ITEM_TYPES } from "./utils";
describe("getFilteredAndSortedFileOperations", () => {
it("works without any datasources", () => {
const fileOptions = useFilteredAndSorted... |
9,720 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/WidgetQueryGeneratorForm/utils.test.ts | import WidgetQueryGeneratorRegistry from "utils/WidgetQueryGeneratorRegistry";
import { getDatasourceConnectionMode } from "./utils";
import type { DatasourceStorage } from "entities/Datasource";
import { PluginPackageName } from "entities/Action";
import PostgreSQL from "WidgetQueryGenerators/PostgreSQL";
import GShee... |
9,777 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/form/fields | petrpan-code/appsmithorg/appsmith/app/client/src/components/editorComponents/form/fields/__tests__/KeyValueFieldArray.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import KeyValueFieldArray from "../KeyValueFieldArray";
import { reduxForm } from "redux-form";
import { render } from "test/testUtils";
const initialProps = {
name: "Headers",
actionConfig: [] as Array<{ key: string; value: string }>,
dataTreePath: ... |
9,785 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components | petrpan-code/appsmithorg/appsmith/app/client/src/components/formControls/DynamicInputTextControl.test.tsx | import React from "react";
import { render, screen } from "test/testUtils";
import DynamicInputTextControl from "./DynamicInputTextControl";
import { reduxForm } from "redux-form";
import { mockCodemirrorRender } from "test/__mocks__/CodeMirrorEditorMock";
import userEvent from "@testing-library/user-event";
import { w... |
9,801 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/components | petrpan-code/appsmithorg/appsmith/app/client/src/components/formControls/utils.test.ts | import {
actionPathFromName,
caculateIsHidden,
checkIfSectionCanRender,
checkIfSectionIsEnabled,
evaluateCondtionWithType,
extractConditionalOutput,
getConfigInitialValues,
getViewType,
isHidden,
switchViewType,
updateEvaluatedSectionConfig,
ViewTypes,
} from "./utils";
import type { HiddenType ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.