cal/packages/app-store/routing-forms
jemiluv8 e7ddcf23a3
fix: Route Builder rules should be case insensitive (#9040)
* override jsonLogic operators on string operands to allow for case insensitive comparisons.

Affected Operators: "==", "===", "!=", "!==", "in"

* disable no-explicit-any on jsonLogicOverrides file since most of the code there will be from jsonLogic and may not meet our coding style.

Majority of overrides require us to copy over functions and their signatures from jsonLogic and then modify their implementation.

The signature of functions implementing most operators take the operands typed as "any", which is intended, but doesn't adhere to our coding style. Hence the need to override the eslint rule

* run linter to fix issues

* Fix bug in in operator when second arg is an array

* remove redundant indexOf check on overriden jsonLogic "in" operator.

Note: this deviates from the original implementation in the jsonLogic library because our current useage ensures that the second operand is always a string or string[] and will therefore always have .index function. Whenever our invariants change in the future, make sure to modify this implementation to prevent any unexpected

---------

Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
2023-05-26 12:16:39 +00:00
..
api
components Improvements: Prefill Routing Forms and connect prefilling with Booking Form (#8780) 2023-05-17 08:47:48 +00:00
emails
lib fix: Route Builder rules should be case insensitive (#9040) 2023-05-26 12:16:39 +00:00
pages Improvements: Prefill Routing Forms and connect prefilling with Booking Form (#8780) 2023-05-17 08:47:48 +00:00
playwright/tests Improvements: Prefill Routing Forms and connect prefilling with Booking Form (#8780) 2023-05-17 08:47:48 +00:00
static Feat/tokens + darkmode + theme support (#7876) 2023-04-05 18:14:46 +00:00
test/lib refactor: Moving from jest to vitest (#9035) 2023-05-24 23:35:44 +00:00
trpc Team webhooks (#8917) 2023-05-23 01:15:29 +00:00
types
config.json Implement UpgradeTip in App install flow (#8968) 2023-05-19 09:52:17 +00:00
DESCRIPTION.md chore/AppStore: Remove deprecated imageSrc and make the paths relative in logo (#8479) 2023-04-26 12:03:34 +01:00
env.d.ts
index.ts
jsonLogicToPrisma.ts
package.json
README.md
trpc-router.ts perf: tRPC procedures and middleware refactor (#8419) 2023-05-09 19:27:05 +00:00
zod.ts

Routing Forms App

How to run Tests

yarn e2e:app-store runs all Apps' tests. You can use describe.only() to run Routing Forms tests only.

Make sure that the app is running already with NEXT_PUBLIC_IS_E2E=1 so that the app is installable