level_0 int64 0 10k | index int64 0 0 | repo_id stringlengths 22 152 | file_path stringlengths 41 203 | content stringlengths 11 11.5M |
|---|---|---|---|---|
1,427 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils/autocomplete | petrpan-code/appsmithorg/appsmith/app/client/src/utils/autocomplete/__tests__/AutocompleteSortRules.test.ts | import type { FieldEntityInformation } from "components/editorComponents/CodeEditor/EditorConfig";
import { AutocompleteSorter } from "../AutocompleteSortRules";
import type {
Completion,
DataTreeDefEntityInformation,
TernCompletionResult,
} from "../CodemirrorTernService";
import { ENTITY_TYPE_VALUE } from "enti... |
1,428 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils/autocomplete | petrpan-code/appsmithorg/appsmith/app/client/src/utils/autocomplete/__tests__/TernServer.test.ts | import type {
Completion,
DataTreeDefEntityInformation,
} from "../CodemirrorTernService";
import CodemirrorTernService, {
createCompletionHeader,
} from "../CodemirrorTernService";
import { AutocompleteDataType } from "../AutocompleteDataType";
import { MockCodemirrorEditor } from "../../../../test/__mocks__/Cod... |
1,429 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils/autocomplete | petrpan-code/appsmithorg/appsmith/app/client/src/utils/autocomplete/__tests__/dataTreeTypeDefCreator.test.ts | import { dataTreeTypeDefCreator } from "utils/autocomplete/dataTreeTypeDefCreator";
import type {
WidgetEntity,
WidgetEntityConfig,
} from "@appsmith/entities/DataTree/types";
import {
ENTITY_TYPE_VALUE,
EvaluationSubstitutionType,
} from "entities/DataTree/dataTreeFactory";
import InputWidget from "widgets/In... |
1,448 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils | petrpan-code/appsmithorg/appsmith/app/client/src/utils/hooks/useDeepEffect.test.ts | import { renderHook } from "@testing-library/react-hooks";
import { useState } from "react";
import useDeepEffect from "./useDeepEffect";
describe(".useDeepEffect", () => {
it("throws an error if using it with an empty array", () => {
const { result } = renderHook(() =>
useDeepEffect(() => {
"test... |
1,472 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils/hooks | petrpan-code/appsmithorg/appsmith/app/client/src/utils/hooks/useWidgetFocus/tabbable.test.ts | import { getNextTabbableDescendant } from "./tabbable";
describe("getNextTabbableDescendant", () => {
it("should return undefined if no descendants are passed", () => {
expect(getNextTabbableDescendant([])).toBeUndefined();
});
});
|
1,476 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils | petrpan-code/appsmithorg/appsmith/app/client/src/utils/migrations/ChartWidget.test.ts | import {
migrateChartWidgetLabelOrientationStaggerOption,
migrateAddShowHideDataPointLabels,
migrateDefaultValuesForCustomEChart,
} from "./ChartWidget";
import type { DSLWidget } from "WidgetProvider/constants";
import type { ChartWidgetProps } from "widgets/ChartWidget/widget";
import { LabelOrientation } from ... |
1,478 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils | petrpan-code/appsmithorg/appsmith/app/client/src/utils/migrations/ChartWidgetReskinningMigrations.test.ts | import type { DSLWidget } from "WidgetProvider/constants";
import { migrateChartWidgetReskinningData } from "./ChartWidgetReskinningMigrations";
const currentDslWithoutCustomConfig = {
widgetName: "MainContainer",
backgroundColor: "none",
rightColumn: 4896,
snapColumns: 64,
detachFromLayout: true,
widgetId... |
1,483 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils | petrpan-code/appsmithorg/appsmith/app/client/src/utils/migrations/CurrencyInputWidgetMigrations.test.ts | import type { DSLWidget } from "WidgetProvider/constants";
import {
migrateCurrencyInputWidgetDefaultCurrencyCode,
migrateInputWidgetShowStepArrows,
} from "./CurrencyInputWidgetMigrations";
const oldDSLWithCurrencyCode = {
widgetName: "MainContainer",
backgroundColor: "none",
rightColumn: 1296,
snapColumn... |
1,490 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils | petrpan-code/appsmithorg/appsmith/app/client/src/utils/migrations/ModalWidget.test.ts | import { GridDefaults } from "constants/WidgetConstants";
import type { DSLWidget } from "WidgetProvider/constants";
import { migrateResizableModalWidgetProperties } from "./ModalWidget";
const inputDsl1: DSLWidget = {
widgetName: "MainContainer",
widgetId: "0",
type: "CANVAS_WIDGET",
version: 15,
parentId: ... |
1,492 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils | petrpan-code/appsmithorg/appsmith/app/client/src/utils/migrations/PhoneInputWidgetMigrations.test.ts | import type { DSLWidget } from "WidgetProvider/constants";
import {
migratePhoneInputWidgetAllowFormatting,
migratePhoneInputWidgetDefaultDialCode,
} from "./PhoneInputWidgetMigrations";
const oldDSL = {
widgetName: "MainContainer",
backgroundColor: "none",
rightColumn: 1296,
snapColumns: 64,
detachFromL... |
1,497 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils | petrpan-code/appsmithorg/appsmith/app/client/src/utils/migrations/SelectWidget.test.ts | import type { DSLWidget } from "WidgetProvider/constants";
import {
MigrateSelectTypeWidgetDefaultValue,
migrateSelectWidgetAddSourceDataPropertyPathList,
migrateSelectWidgetSourceDataBindingPathList,
} from "./SelectWidget";
describe("MigrateSelectTypeWidgetDefaultValue", () => {
describe("Select widget", () ... |
1,499 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils | petrpan-code/appsmithorg/appsmith/app/client/src/utils/migrations/TableWidget.test.ts | import { cloneDeep } from "lodash";
import type { DSLWidget } from "WidgetProvider/constants";
import {
tableWidgetPropertyPaneMigrations,
migrateTableWidgetParentRowSpaceProperty,
migrateTableWidgetHeaderVisibilityProperties,
migrateTableWidgetSelectedRowBindings,
migrateTableSanitizeColumnKeys,
migrateTab... |
1,501 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils | petrpan-code/appsmithorg/appsmith/app/client/src/utils/migrations/TextWidget.test.ts | import {
migrateTextStyleFromTextWidget,
migrateScrollTruncateProperties,
} from "utils/migrations/TextWidget";
import { FontStyleTypes, TextSizes } from "constants/WidgetConstants";
import type { DSLWidget } from "WidgetProvider/constants";
import { OverflowTypes } from "widgets/TextWidget/constants";
const input... |
1,503 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/utils | petrpan-code/appsmithorg/appsmith/app/client/src/utils/migrations/ThemingMigration.test.ts | import { klona } from "klona";
import type { DSLWidget } from "WidgetProvider/constants";
import { migrateChildStylesheetFromDynamicBindingPathList } from "./ThemingMigrations";
const inputDSL1 = {
widgetName: "MainContainer",
backgroundColor: "none",
rightColumn: 1224,
snapColumns: 64,
detachFromLayout: tr... |
1,516 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/WidgetUtils.test.ts | import {
ButtonBorderRadiusTypes,
ButtonVariantTypes,
} from "components/constants";
import type { PropertyUpdates } from "WidgetProvider/constants";
import {
RenderModes,
TextSizes,
WidgetHeightLimits,
} from "constants/WidgetConstants";
import { remove } from "lodash";
import { getTheme, ThemeMode } from "s... |
1,520 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/utils.test.ts | import { getVideoConstraints } from "./utils";
describe("getVideoConstraints", () => {
test("returns default video constraints when no deviceId and not mobile", () => {
const prevConstraints = { width: { ideal: 1280 }, height: { ideal: 720 } };
const defaultCamera = "environment";
const isMobile = false;... |
1,531 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/AudioWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/AudioWidget/widget/index.test.tsx | import type { PropertyPaneControlConfig } from "constants/PropertyControlConstants";
import AudioWidget from ".";
const urlTests = [
{ url: "https://appsmith.com/", isValid: true },
{ url: "http://appsmith.com/", isValid: true },
{ url: "appsmith.com/", isValid: true },
{ url: "appsmith.com", isValid: true },
... |
1,569 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component/CustomEChartIFrameComponent.test.tsx | import type { ChartComponentConnectedProps } from ".";
import type { ChartData } from "../constants";
import {
DefaultEChartConfig,
LabelOrientation,
DefaultFusionChartConfig,
} from "../constants";
import React from "react";
import { render } from "@testing-library/react";
import "@testing-library/jest-dom";
i... |
1,571 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component/EChartsConfigurationBuilder.test.ts | import { Colors } from "constants/Colors";
import type { ChartComponentProps } from ".";
import type { ChartData } from "../constants";
import { LabelOrientation } from "../constants";
import { EChartsConfigurationBuilder } from "./EChartsConfigurationBuilder";
describe("EChartsConfigurationBuilder", () => {
const b... |
1,573 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component/EChartsDatasetBuilder.test.ts | import { EChartsDatasetBuilder } from "./EChartsDatasetBuilder";
import type { ChartData, ChartType } from "../constants";
describe("EChartsConfigurationBuilder", () => {
describe("filteredChartData", () => {
const chartData1: ChartData = {
seriesName: "series1",
data: [{ x: "x1", y: "y1" }],
c... |
1,576 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component/helpers.test.ts | import type { ChartType } from "../constants";
import {
parseOnDataPointClickParams,
parseOnDataPointClickForCustomEChart,
parseOnDataPointClickForCustomFusionChart,
} from "./helpers";
describe("parseOnDataPointClickParams", () => {
it("returns appropriate chart selected point from user click data", () => {
... |
1,578 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component/index.test.tsx | import ChartComponent from ".";
import type { ChartComponentProps } from ".";
import type { ChartData } from "../constants";
import {
DefaultEChartConfig,
LabelOrientation,
DefaultFusionChartConfig,
} from "../constants";
import React from "react";
import { render } from "@testing-library/react";
import "@testi... |
1,580 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component/LayoutBuilders/EChartsElementVisibilityCalculator.test.ts | import { EChartElementVisibilityCalculator } from "./EChartsElementVisibilityCalculator";
import type { EChartElementLayoutParams } from "./EChartsElementVisibilityCalculator";
describe("EChartsElementVisibilityCalculator", () => {
describe("visibility calculator", () => {
it("returns no elements if element minH... |
1,582 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component/LayoutBuilders/EChartsLayoutBuilder.test.ts | import { LabelOrientation } from "widgets/ChartWidget/constants";
import { EChartsLayoutBuilder } from "./EChartsLayoutBuilder";
const font = "14px Nunito Sans";
describe("priority order of layout", () => {
it("returns the correct priority order", () => {
const builder = new EChartsLayoutBuilder({
allowSc... |
1,584 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component/LayoutBuilders/EChartsXAxisLayoutBuilder.test.ts | import type { ChartType } from "../../constants";
import { LabelOrientation } from "../../constants";
import { EChartsXAxisLayoutBuilder } from "./EChartsXAxisLayoutBuilder";
const font = "14px Nunito Sans";
describe("EChartsXAxisLayoutBuilder", () => {
describe("width for xaxis labels", () => {
it("returns a d... |
1,586 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/component/LayoutBuilders/EChartsYAxisLayoutBuilder.test.ts | import { EChartsYAxisLayoutBuilder } from "./EChartsYAxisLayoutBuilder";
const font = "14px Nunito Sans";
describe("EChartsYAxisLayoutBuilder", () => {
describe("maxWidthForLabels", () => {
it("returns the max width for labels to equal sum of label width in pixels and an offset", () => {
const builder = ne... |
1,588 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/widget/SyntaxErrorsEvaluation.test.ts | import { LabelOrientation } from "../constants";
import type { ChartWidgetProps } from ".";
import type { ChartData } from "../constants";
import type { WidgetError } from "widgets/BaseWidget";
import { syntaxErrorsFromProps } from "./SyntaxErrorsEvaluation";
import { RenderModes } from "constants/WidgetConstants";
de... |
1,590 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/widget/index.test.ts | import { emptyChartData } from ".";
import ChartWidget from ".";
import { LabelOrientation } from "../constants";
import type { ChartWidgetProps } from ".";
import type { ChartData } from "../constants";
import { RenderModes } from "constants/WidgetConstants";
describe("emptyChartData", () => {
const seriesData1: Ch... |
1,592 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ChartWidget/widget/propertyConfig.test.ts | /* eslint-disable @typescript-eslint/no-namespace */
import { isString } from "lodash";
import { styleConfig, contentConfig } from "./propertyConfig";
import type { PropertyPaneControlConfig } from "constants/PropertyControlConstants";
const customEChartsEnabled = true;
const showFusionChartDeprecationMessage = true;... |
1,598 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/CheckboxGroupWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/CheckboxGroupWidget/widget/index.test.tsx | // eslint-disable-next-line
// @ts-nocheck
import { defaultSelectedValuesValidation } from "./";
describe("<CheckboxGroup />", () => {
test("should return empty parsed array on null options", async () => {
const result = defaultSelectedValuesValidation("", {
options: null,
});
expect(result).toStr... |
1,616 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/CodeScannerWidget/widget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/CodeScannerWidget/widget/propertyConfig/contetConfig.test.ts | import type {
PropertyPaneConfig,
PropertyPaneControlConfig,
} from "constants/PropertyControlConstants";
import { DefaultMobileCameraTypes } from "WidgetProvider/constants";
import contentConfig from "./contentConfig";
describe("codescanner property control", () => {
const propertyConfigs = contentConfig
.m... |
1,621 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ContainerWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ContainerWidget/widget/index.test.tsx | import GlobalHotKeys from "pages/Editor/GlobalHotKeys";
import React from "react";
import { MemoryRouter } from "react-router-dom";
import * as utilities from "selectors/editorSelectors";
import * as useDynamicAppLayoutHook from "utils/hooks/useDynamicAppLayout";
import * as useCanvasDraggingHook from "layoutSystems/f... |
1,627 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/CurrencyInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/CurrencyInputWidget/component/utilities.test.ts | import {
getLocaleDecimalSeperator,
getLocaleThousandSeparator,
} from "widgets/WidgetUtils";
import {
countryToFlag,
formatCurrencyNumber,
limitDecimalValue,
parseLocaleFormattedStringToNumber,
} from "./utilities";
let locale = "en-US";
jest.mock("utils/helpers", () => {
const originalModule = jest.re... |
1,630 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/CurrencyInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/CurrencyInputWidget/widget/derived.test.ts | import derivedProperty from "./derived";
describe("Derived property - ", () => {
describe("isValid property", () => {
it("should test isRequired", () => {
let isValid = derivedProperty.isValid({
text: undefined,
isRequired: false,
});
expect(isValid).toBeTruthy();
isVali... |
1,631 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/CurrencyInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/CurrencyInputWidget/widget/index.test.tsx | import type { CurrencyInputWidgetProps } from "./index";
import { defaultValueValidation } from "./index";
import _ from "lodash";
describe("defaultValueValidation", () => {
let result: any;
it("should validate defaulttext", () => {
result = defaultValueValidation("100", {} as CurrencyInputWidgetProps, _);
... |
1,642 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DatePickerWidget2 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DatePickerWidget2/component/Date.test.ts | import moment from "moment";
import { DateFormatOptions } from "../widget/constants";
import { parseDate } from "./utils";
describe("DatePickerWidget", () => {
it("should parse date strings correctly according to date formats", () => {
const testDate = new Date(2000000000000); // let's enter into the future
... |
1,654 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DividerWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DividerWidget/widget/index.test.tsx | import { render } from "@testing-library/react";
import { dark, theme } from "constants/DefaultTheme";
import React from "react";
import { Provider } from "react-redux";
import configureStore from "redux-mock-store";
import { ThemeProvider } from "styled-components";
import type { DividerWidgetProps } from "./";
import... |
1,660 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DocumentViewerWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DocumentViewerWidget/component/ExcelDataParser.test.ts | import type { RawSheetData, ExcelData, HeaderCell } from "./ExcelDataParser";
import { parseExcelData } from "./ExcelDataParser";
describe("parseExcelData", () => {
describe("Header", () => {
it("returns a list of header columns using the data", () => {
const data: RawSheetData = [
["r0c0", "r0c1",... |
1,663 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DocumentViewerWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DocumentViewerWidget/component/index.test.tsx | import { getDocViewerConfigs } from "widgets/DocumentViewerWidget/component";
import { Renderers } from "../constants";
describe("validate document viewer url", () => {
it("validate correct config should return for extension based urls", () => {
const input = [
"https://roteemealplancover.s3.ap-south-1.ama... |
1,665 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DocumentViewerWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DocumentViewerWidget/widget/index.test.tsx | import { documentUrlValidation } from ".";
describe("validate propertypane input : docUrl", () => {
it("validation for empty or space value", () => {
const input1 = "";
const expected1 = {
isValid: true,
parsed: "",
messages: [{ name: "", message: "" }],
};
const result = documentU... |
1,672 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DropdownWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/DropdownWidget/widget/index.test.tsx | import { fireEvent, render, screen } from "@testing-library/react";
import { dark, theme } from "constants/DefaultTheme";
import React from "react";
import { Provider } from "react-redux";
import configureStore from "redux-mock-store";
import { ThemeProvider } from "styled-components";
import type { DropdownWidgetProps... |
1,685 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/FilePickerWidgetV2 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/FilePickerWidgetV2/widget/FileParser.test.tsx | import FileDataTypes from "../constants";
import parseFileData from "./FileParser";
import fs from "fs";
import path from "path";
describe("File parser formats differenty file types correctly", () => {
it("parses csv file correclty", async () => {
const fixturePath = path.resolve(
__dirname,
"../../.... |
1,723 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidget/component/index.test.tsx | import store from "store";
import React from "react";
import { ThemeProvider } from "styled-components";
import { theme } from "constants/DefaultTheme";
import InputComponent from "./";
import { Provider } from "react-redux";
import ReactDOM from "react-dom";
import { act } from "react-dom/test-utils";
import { noop } ... |
1,725 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidget/component/utilities.test.ts | import {
formatCurrencyNumber,
limitDecimalValue,
getDecimalSeparator,
getGroupSeparator,
} from "./utilities";
describe("currency Number formating", () => {
it("Without Decimal", () => {
const response = formatCurrencyNumber(undefined, "1234560", ".");
expect(response).toStrictEqual("1,234,560");
... |
1,727 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidget/widget/index.test.tsx | import type { InputWidgetProps } from "./index";
import { defaultValueValidation } from "./index";
import _ from "lodash";
describe("#defaultValueValidation", () => {
const defaultInputWidgetProps: InputWidgetProps = {
backgroundColor: "",
borderRadius: "",
bottomRow: 2,
inputType: "NUMBER",
inpu... |
1,732 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidgetV2 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidgetV2/widget/Utilities.test.ts | import { InputTypes } from "widgets/BaseInputWidget/constants";
import { getParsedText } from "./Utilities";
describe("getParsedText", () => {
it("should test with all possible values", () => {
let text = getParsedText("test", InputTypes.TEXT);
expect(text).toBe("test");
text = getParsedText("test1", I... |
1,735 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidgetV2 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidgetV2/widget/derived.test.ts | import _ from "lodash";
import { InputTypes } from "widgets/BaseInputWidget/constants";
import derivedProperty from "./derived";
describe("Derived property - ", () => {
describe("isValid property", () => {
it("should test isRequired", () => {
//Number input with required false and empty value
let isV... |
1,736 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidgetV2 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/InputWidgetV2/widget/index.test.tsx | import type { InputWidgetProps } from "./index";
import {
defaultValueValidation,
minValueValidation,
maxValueValidation,
} from "./index";
import _ from "lodash";
describe("defaultValueValidation", () => {
let result: any;
it("should validate defaulttext of text type", () => {
result = defaultValueVali... |
1,741 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/helper.test.ts | import type { Schema, SchemaItem } from "./constants";
import {
ARRAY_ITEM_KEY,
DataType,
FieldType,
ROOT_SCHEMA_KEY,
} from "./constants";
import {
convertSchemaItemToFormData,
countFields,
mergeAllObjectsInAnArray,
schemaItemDefaultValue,
validateOptions,
} from "./helper";
describe(".schemaItemDef... |
1,745 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/schemaParser.test.ts | import { get, set } from "lodash";
import { klona } from "klona";
import SchemaParser, {
applyPositions,
checkIfArrayAndSubDataTypeChanged,
constructPlausibleObjectFromArray,
dataTypeFor,
fieldTypeFor,
getKeysFromSchema,
getSourceDataPathFromSchemaItemPath,
getSourcePath,
hasNullOrUndefined,
normal... |
1,757 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/fields/ArrayField.test.tsx | import React from "react";
import "@testing-library/jest-dom";
import { render } from "@testing-library/react";
import { FormProvider, useForm } from "react-hook-form";
import ArrayField from "./ArrayField";
import { FormContextProvider } from "../FormContext";
import { ThemeProvider } from "styled-components";
const ... |
1,761 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/fields/CurrencyInputField.test.ts | import type { CurrencyInputFieldProps } from "./CurrencyInputField";
import { isValid } from "./CurrencyInputField";
describe("Currency Input Field", () => {
it("return validity when not required", () => {
const inputs = [
{ value: "", expectedOutput: true },
{ value: "0", expectedOutput: true },
... |
1,765 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/fields/InputField.test.ts | import { FieldType } from "../constants";
import type { InputFieldProps } from "./InputField";
import { isValid } from "./InputField";
describe("Input Field - Number", () => {
it("return validity when not required", () => {
const inputs = [
{ value: "", expectedOutput: true },
{ value: "0", expectedO... |
1,769 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/fields/PhoneInputField.test.ts | import { FieldType } from "../constants";
import type { PhoneInputFieldProps } from "./PhoneInputField";
import { isValid } from "./PhoneInputField";
describe("Phone Input Field", () => {
it("return validity when not required", () => {
const inputs = [
{ value: "", expectedOutput: true },
{ value: "0... |
1,772 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/fields/SelectField.test.tsx | import type { SelectFieldProps } from "./SelectField";
import { isValid } from "./SelectField";
describe(".isValid", () => {
it("returns true when isRequired is false", () => {
const inputs = [
{ value: "", expectedOutput: true },
{ value: "0", expectedOutput: true },
{ value: "1", expectedOutp... |
1,778 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/fields/useRegisterFieldValidity.test.tsx | import React from "react";
import { renderHook } from "@testing-library/react-hooks";
import { FormProvider, useForm } from "react-hook-form";
import { FormContextProvider } from "../FormContext";
import type { UseRegisterFieldValidityProps } from "./useRegisterFieldValidity";
import useRegisterFieldValidity from "./u... |
1,781 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget/helper.test.ts | import type { FieldThemeStylesheet, Schema } from "../constants";
import {
ARRAY_ITEM_KEY,
DataType,
FieldType,
ROOT_SCHEMA_KEY,
} from "../constants";
import schemaTestData from "../schemaTestData";
import {
ComputedSchemaStatus,
computeSchema,
dynamicPropertyPathListFromSchema,
generateFieldState,
g... |
1,784 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget/propertyConfig.test.ts | import type { OnButtonClickProps } from "components/propertyControls/ButtonControl";
import { set } from "lodash";
import { EVALUATION_PATH } from "utils/DynamicBindingUtils";
import schemaTestData from "../schemaTestData";
import { onGenerateFormClick } from "./propertyConfig";
import generatePanelPropertyConfig from... |
1,786 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget/propertyConfig/generatePanelPropertyConfig.test.ts | import type { PropertyPaneControlConfig } from "constants/PropertyControlConstants";
import generatePanelPropertyConfig from "./generatePanelPropertyConfig";
describe(".generatePanelPropertyConfig", () => {
it("generates nested panel property config based on level", () => {
const level = 2;
const result = ge... |
1,788 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget/propertyConfig/helper.test.ts | import { get, set } from "lodash";
import schemaTestData from "widgets/JSONFormWidget/schemaTestData";
import type { Schema, SchemaItem } from "widgets/JSONFormWidget/constants";
import {
ARRAY_ITEM_KEY,
DataType,
FieldType,
} from "widgets/JSONFormWidget/constants";
import type { JSONFormWidgetProps } from ".."... |
1,797 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget/propertyConfig | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget/propertyConfig/properties/multiselect.test.ts | import _ from "lodash";
import type { JSONFormWidgetProps } from "../..";
import { defaultOptionValueValidation } from "./multiSelect";
describe(".defaultOptionValueValidation", () => {
it("return undefined when input is undefined", () => {
const input = undefined;
const expectedOutput = {
isValid: tr... |
1,799 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget/propertyConfig | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget/propertyConfig/properties/radioGroup.test.ts | import _ from "lodash";
import type { JSONFormWidgetProps } from "../..";
import { optionsValidation } from "./radioGroup";
/**
* Note: If this test fails then it is an indication than the JSONForm
* radio group field options validation doesn't comply with the radio group
* widget's options validation due to the c... |
1,801 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget/propertyConfig | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/JSONFormWidget/widget/propertyConfig/properties/select.test.ts | import _ from "lodash";
import type { JSONFormWidgetProps } from "../..";
import { defaultOptionValueValidation } from "./select";
describe(".defaultOptionValueValidation", () => {
it("return undefined when input is undefined", () => {
const input = undefined;
const expectedOutput = {
isValid: true,
... |
1,811 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ListWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ListWidget/widget/index.test.tsx | import type { AutocompletionDefinitions } from "WidgetProvider/constants";
import ListWidget from ".";
import type { WidgetProps } from "widgets/BaseWidget";
describe("Autocomplete suggestions test", () => {
it("lists the right autocomplete suggestions", () => {
const listWidgetProps: WidgetProps = {
widge... |
1,815 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ListWidgetV2/MetaWidgetGenerator.test.ts | import { difference } from "lodash";
import { klona } from "klona";
import type { ConstructorProps, GeneratorOptions } from "./MetaWidgetGenerator";
import MetaWidgetGenerator from "./MetaWidgetGenerator";
import type { FlattenedWidgetProps } from "WidgetProvider/constants";
import { nestedListInput, simpleListInput }... |
1,817 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ListWidgetV2/Queue.test.ts | import Queue from "./Queue";
enum TestType {
A,
B,
C,
D,
}
describe("#has", () => {
it("returns true for item type present in queue", () => {
const defaultQueueItems = [
{ type: TestType.A },
{ type: TestType.B, metadata: { foo: "bar " } },
];
const queue = new Queue<TestType>(defaul... |
1,828 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ListWidgetV2 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ListWidgetV2/widget/helper.test.ts | import type { FlattenedWidgetProps } from "WidgetProvider/constants";
import {
getNumberOfChildListWidget,
getNumberOfParentListWidget,
} from "./helper";
const widgets = {
"0": {
widgetId: "0",
type: undefined,
parentId: undefined,
children: ["139ik5upi0", "3oplcuqz12"],
},
"3oplcuqz12": {
... |
1,832 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ListWidgetV2 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/ListWidgetV2/widget/propertyConfig.test.ts | import _ from "lodash";
import {
defaultSelectedItemValidation,
primaryColumnValidation,
} from "./propertyConfig";
import type { ListWidgetProps } from ".";
import type { ValidationResponse } from "constants/WidgetValidation";
describe(".primaryColumnValidation", () => {
it("validates uniqueness of values with... |
1,854 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/MenuButtonWidget/validations.test.ts | import _ from "lodash";
import { sourceDataArrayValidation } from "./validations";
describe("sourceDataArrayValidation", () => {
it("Should test with valid values", () => {
const mockSourceData = [
{
step: "#1",
task: "Drop a table",
status: "✅",
action: "",
},
{... |
1,857 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/MenuButtonWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/MenuButtonWidget/widget/helper.test.ts | import { getKeysFromSourceDataForEventAutocomplete } from "./helper";
describe("getKeysFromSourceDataForEventAutocomplete", () => {
it("Should test with valid values - array of objects", () => {
const mockProps = [
{
step: "#1",
task: "Drop a table",
status: "✅",
action: "",... |
1,875 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/MultiSelectTreeWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/MultiSelectTreeWidget/widget/derived.test.ts | import _ from "lodash";
import { flat } from "widgets/WidgetUtils";
import derivedProperty from "./derived";
const options = [
{
label: "Blue",
value: "BLUE",
children: [
{
label: "Dark Blue",
value: "DARK BLUE",
},
{
label: "Light Blue",
value: "LIGHT BL... |
1,893 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/MultiSelectWidgetV2 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/MultiSelectWidgetV2/widget/propertyUtils.test.ts | import type { LoDashStatic } from "lodash";
import { set } from "lodash";
import _ from "lodash";
import { EVAL_VALUE_PATH } from "utils/DynamicBindingUtils";
import type { WidgetProps } from "widgets/BaseWidget";
import {
labelKeyValidation,
getLabelValueAdditionalAutocompleteData,
getLabelValueKeyOptions,
val... |
1,913 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/PhoneInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/PhoneInputWidget/component/utilities.test.ts | import { countryToFlag } from "./utilities";
describe("Utilities - ", () => {
it("should test countryToFlag", () => {
[
["+91", "🇮🇳"],
["+1", "🇺🇸"],
["", ""],
].forEach((d) => {
expect(countryToFlag(d[0])).toBe(d[1]);
});
});
});
|
1,916 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/PhoneInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/PhoneInputWidget/widget/derived.test.ts | import derivedProperty from "./derived";
describe("Derived property - ", () => {
describe("isValid property", () => {
it("should test isRequired", () => {
let isValid = derivedProperty.isValid({
text: undefined,
isRequired: false,
});
expect(isValid).toBeTruthy();
isVali... |
1,917 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/PhoneInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/PhoneInputWidget/widget/index.test.tsx | import type { PhoneInputWidgetProps } from "./index";
import { defaultValueValidation } from "./index";
import _ from "lodash";
describe("defaultValueValidation", () => {
let result: any;
it("should validate defaulttext", () => {
result = defaultValueValidation(
"0000000000",
{} as PhoneInputWidge... |
1,940 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/RadioGroupWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/RadioGroupWidget/widget/propertyPaneConfig.test.ts | import _ from "lodash";
import RadioGroupWidget from "./index";
describe("unit test case for property config pane", () => {
it("case: check the value returned by defaultOptionValue", () => {
const dataSection: any =
RadioGroupWidget.getPropertyPaneContentConfig().filter(
(section: any) => section.s... |
1,960 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/SelectWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/SelectWidget/component/SelectButton.test.tsx | import React from "react";
import { IconWrapper } from "@design-system/widgets-old";
import { fireEvent, render } from "@testing-library/react";
import type { SelectButtonProps } from "./SelectButton";
import SelectButton from "./SelectButton";
// It is necessary to make a mock of the Icon component as the error fall... |
1,965 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/SelectWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/SelectWidget/widget/derived.test.ts | import _ from "lodash";
import derivedProperty from "./derived";
describe("Derived property - Select Widget", () => {
describe("#getIsValid", () => {
it("return true when isRequired false and selectedOptionValue is empty string", () => {
const isValid = derivedProperty.getIsValid(
{
isReq... |
1,968 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/SelectWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/SelectWidget/widget/propertyUtils.test.ts | import type { LoDashStatic } from "lodash";
import { set } from "lodash";
import _ from "lodash";
import { EVAL_VALUE_PATH } from "utils/DynamicBindingUtils";
import type { WidgetProps } from "widgets/BaseWidget";
import type { SelectWidgetProps } from ".";
import {
defaultOptionValueValidation,
labelKeyValidation,... |
1,975 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/SingleSelectTreeWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/SingleSelectTreeWidget/widget/derived.test.ts | import _ from "lodash";
import { flat } from "widgets/WidgetUtils";
import derivedProperty from "./derived";
const options = [
{
label: "Blue",
value: "BLUE",
children: [
{
label: "Dark Blue",
value: "DARK BLUE",
},
{
label: "Light Blue",
value: "LIGHT BL... |
1,996 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget/component/CommonUtilities.test.ts | import {
sortTableFunction,
transformTableDataIntoCsv,
} from "./CommonUtilities";
import type { TableColumnProps } from "./Constants";
import { ColumnTypes } from "./Constants";
describe("TableUtilities", () => {
it("works as expected for sort table rows", () => {
const filteredTableData: Array<Record<strin... |
1,998 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget/component/Constants.test.ts | import { ConditionFunctions } from "./Constants";
import moment from "moment";
describe("ConditionFunctions Constants", () => {
it("works as expected for isExactly", () => {
const conditionFunction = ConditionFunctions["isExactly"];
expect(conditionFunction("test", "test")).toStrictEqual(true);
});
it("w... |
2,009 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget/component/TableHelpers.test.ts | import type { ColumnProperties } from "./Constants";
import { reorderColumns } from "./TableHelpers";
import { getCurrentRowBinding } from "widgets/TableWidget/constants";
const MOCK_COLUMNS: Record<string, ColumnProperties> = {
id: {
isDerived: false,
computedValue: getCurrentRowBinding("Table1", "currentRow... |
2,013 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget/component/TableUtilities.test.tsx | import { renderCell } from "./TableUtilities";
import { ColumnTypes } from "widgets/TableWidget/component/Constants";
describe("Test table columnType Image render", () => {
it("columnType Image accepts single image url and renders image correctly", () => {
const value =
"http://codeskulptor-demos.commondat... |
2,019 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget/widget/getTableColumns.test.tsx | import { getPropertyValue } from "./getTableColumns";
describe("getTableColumns", () => {
describe("getPropertyValue", () => {
it("should test that object value is processed properly", () => {
const obj = {
test: "someRandomTestValue",
};
expect(getPropertyValue(obj, 0, true)).toBe(obj... |
2,024 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget/widget/propertyConfig.test.ts | import TableWidget from "./index";
describe("unit test case for property config pane", () => {
it("case: check tooltip text for total record count property exists", () => {
const generalSection: any = TableWidget.getPropertyPaneConfig().filter(
(section: any) => section.sectionName === "General",
);
... |
2,026 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget/widget/propertyUtils.test.ts | import {
defaultSelectedRowValidation,
updateIconNameHook,
} from "./propertyUtils";
import _ from "lodash";
const tableWProps = {
multiRowSelection: false,
widgetName: "Table1",
defaultPageSize: 0,
columnOrder: ["step", "task", "status", "action"],
isVisibleDownload: true,
dynamicPropertyPathList: [],... |
2,028 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidget/widget/utilities.test.ts | import {
getOriginalRowIndex,
selectRowIndex,
selectRowIndices,
} from "./utilities";
describe("getOriginalRowIndex", () => {
it("With no previous data ", () => {
const oldTableData = [
{
step: "#1",
task: " a fetch_users wih the Mock DB",
status: "--",
},
{
... |
2,033 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidgetV2 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidgetV2/component/Constants.test.ts | import { ConditionFunctions } from "./Constants";
import moment from "moment";
describe("ConditionFunctions Constants", () => {
it("works as expected for isExactly", () => {
const conditionFunction = ConditionFunctions["isExactly"];
expect(conditionFunction("test", "test")).toStrictEqual(true);
});
it("w... |
2,056 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidgetV2/component | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidgetV2/component/cellComponents/PlainTextCell.test.tsx | import { getCellText } from "./PlainTextCell";
import { ColumnTypes } from "widgets/TableWidgetV2/constants";
describe("DefaultRendere - ", () => {
describe("getCellText", () => {
it("should test with different values", () => {
[
{
value: "#1",
cellProperties: { displayText: "te... |
2,069 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidgetV2/component/header | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidgetV2/component/header/actions/Utilities.test.ts | import { transformTableDataIntoCsv } from "./Utilities";
import type { TableColumnProps } from "../../Constants";
import { ColumnTypes } from "widgets/TableWidgetV2/constants";
describe("TransformTableDataIntoArrayOfArray", () => {
const columns: TableColumnProps[] = [
{
Header: "Id",
id: "id",
... |
2,083 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidgetV2 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidgetV2/widget/propertyUtils.test.ts | import {
totalRecordsCountValidation,
uniqueColumnNameValidation,
updateColumnStyles,
updateColumnOrderHook,
getBasePropertyPath,
hideByColumnType,
uniqueColumnAliasValidation,
updateCustomColumnAliasOnLabelChange,
selectColumnOptionsValidation,
allowedFirstDayOfWeekRange,
} from "./propertyUtils";
... |
2,085 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidgetV2 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TableWidgetV2/widget/utilities.test.ts | import type { ColumnProperties, TableStyles } from "../component/Constants";
import { StickyType } from "../component/Constants";
import { ColumnTypes } from "../constants";
import {
convertNumToCompactString,
escapeString,
generateNewColumnOrderFromStickyValue,
getAllTableColumnKeys,
getArrayPropertyValue,
... |
2,119 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TabsWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/TabsWidget/widget/index.test.tsx | import {
buildChildren,
widgetCanvasFactory,
} from "test/factories/WidgetFactoryUtils";
import { render, fireEvent } from "test/testUtils";
import * as widgetRenderUtils from "utils/widgetRenderUtils";
import * as dataTreeSelectors from "selectors/dataTreeSelectors";
import * as editorSelectors from "selectors/edi... |
2,204 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSCurrencyInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSCurrencyInputWidget/component/utilities.test.ts | import {
getLocaleDecimalSeperator,
getLocaleThousandSeparator,
} from "widgets/WidgetUtils";
import {
formatCurrencyNumber,
limitDecimalValue,
parseLocaleFormattedStringToNumber,
} from "./utilities";
let locale = "en-US";
jest.mock("utils/helpers", () => {
const originalModule = jest.requireActual("util... |
2,207 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSCurrencyInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSCurrencyInputWidget/widget/derived.test.ts | import derivedProperty from "./derived";
describe("Derived property - ", () => {
describe("isValid property", () => {
it("should test isRequired", () => {
let isValid = derivedProperty.isValid({
text: undefined,
isRequired: false,
});
expect(isValid).toBeTruthy();
isVali... |
2,208 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSCurrencyInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSCurrencyInputWidget/widget/helpers.test.ts | import { countryToFlag } from "./helpers";
describe("countryToFlag", () => {
it("should test countryToFlag", () => {
[
["IN", "🇮🇳"],
["in", "🇮🇳"],
["US", "🇺🇸"],
].forEach((d) => {
expect(countryToFlag(d[0])).toBe(d[1]);
});
String.fromCodePoint = undefined as any;
[
... |
2,210 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSCurrencyInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSCurrencyInputWidget/widget/index.test.tsx | import type { CurrencyInputWidgetProps } from "./types";
import { defaultValueValidation } from "./config/propertyPaneConfig/validations";
import _ from "lodash";
describe("defaultValueValidation", () => {
let result: any;
it("should validate defaulttext", () => {
result = defaultValueValidation("100", {} as ... |
2,245 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSInputWidget/widget/derived.test.ts | import _ from "lodash";
import { InputTypes } from "widgets/BaseInputWidget/constants";
import derivedProperty from "./derived";
describe("Derived property - ", () => {
describe("isValid property", () => {
it("should test isRequired", () => {
//Number input with required false and empty value
let isV... |
2,246 | 0 | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSInputWidget | petrpan-code/appsmithorg/appsmith/app/client/src/widgets/wds/WDSInputWidget/widget/helper.test.ts | import { InputTypes } from "widgets/BaseInputWidget/constants";
import { parseText } from "./helper";
describe("getParsedText", () => {
it("should test with all possible values", () => {
let text;
text = parseText("test", InputTypes.TEXT);
expect(text).toBe("test");
text = parseText("test1", InputT... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.