* initial commit * props hoc * changes * removed ignores and withWidgetProps * added extra props to canvasStructure * widget props changes * list widget changes * reintroduced widget props hook and other refactors * remove warnings * added deepequal for childWidgets selector * fix global hotkeys and tabs widget jest test * fix main container test fix * fixed view mode width * fix form widget values * minor fix * fix skeleton * form widget validity fix * jest test fix * fixed tests: GlobalHotkeys, Tabs, CanvasSelectectionArena and fixed main container rendering * minor fix * minor comments * reverted commented code * simplified structure, selective redux state updates and other inconsistencies * fix junit test cases * stop form widget from force rendering children * fix test case * random commit to re run tests * update isFormValid prop only if it exists * detangling circular dependency * fixing cypress tests * cleaned up code * clean up man cnavas props and fix jest cases * fix rendering order of child widgets for canvas * fix dropdown reset spec * adding comments * cleaning up unwanted code * fix multiselect widget on deploy * adressing review comments * addressing minor review comment changes * destructuring modal widget child and fix test case * fix communityIssues cypress spec * rewrite isVisible logic to match previous behaviour * merging widget props with component props before checking isVisible * adressing review comments for modal widget's isVisible Co-authored-by: rahulramesha <rahul@appsmith.com>
32 lines
986 B
TypeScript
32 lines
986 B
TypeScript
import { areArraysEqual, getCamelCaseString } from "utils/AppsmithUtils";
|
|
|
|
describe("getCamelCaseString", () => {
|
|
it("Should return a string in camelCase", () => {
|
|
const inputs = ["abcd", "ab12cd", "开关", "😃 😃 😃"];
|
|
const expected = ["abcd", "ab12Cd", "", ""];
|
|
|
|
inputs.forEach((input, index) => {
|
|
const result = getCamelCaseString(input);
|
|
expect(result).toStrictEqual(expected[index]);
|
|
});
|
|
});
|
|
});
|
|
|
|
describe("test areArraysEqual", () => {
|
|
it("test areArraysEqual method", () => {
|
|
const OGArray = ["test1", "test2", "test3"];
|
|
|
|
let testArray: string[] = [];
|
|
expect(areArraysEqual(OGArray, testArray)).toBe(false);
|
|
|
|
testArray = ["test1", "test3"];
|
|
expect(areArraysEqual(OGArray, testArray)).toBe(false);
|
|
|
|
testArray = ["test1", "test2", "test3"];
|
|
expect(areArraysEqual(OGArray, testArray)).toBe(true);
|
|
|
|
testArray = ["test1", "test3", "test2"];
|
|
expect(areArraysEqual(OGArray, testArray)).toBe(true);
|
|
});
|
|
});
|