* feat: add comprehensive E2E tests for routing form attribute conditions Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com> * refactor: assert routedTeamMemberIds in URL instead of email in results Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com> * refactor: assert both routedTeamMemberIds in URL and email in results Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com> * fix: include users without attribute assignments in exclusion condition evaluation Users with no attribute assigned were excluded from the team members list entirely, causing exclusion operators (not_equals, not_some_in, not_like, not_between, etc.) to never match them. Now getAttributesAssignmentData includes all team members, even those without attribute assignments. Also adds unit tests and E2E tests for this scenario. Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com> * fix: update getAttributes test to reflect new behavior for empty attributes Users without attribute assignments are now included with empty attributes so exclusion operators can match them. Updated test expectation accordingly. Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com> * refactor: remove redundant usersWithAssignments code (fix already in _prepareAssignmentData from main) Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Routing Forms App
Vocabulary
- RaqbField refers to the field in the context of React Awesome Query Builder(RAQB)
- See
getQueryBuilderConfig
- See
- Field refers to the field in the Routing Form
Understanding the structure of queryValue(type JsonTree)
AttributeQueryValue
- { id: "Some-id-generated-and-used-internally-by-raqb" type: "group", children1: { "Some-other-id-generated-and-used-internally-by-raqb": { type: "rule", properties: { field: "ATTRIBUTE.id", operator: "multiselect_equals", // One of many operators possible value: ["AttributeOption.id"], // This is the type of the attribute and the operator corresponds to it. The data provided to jsonLogic on which the logic(generated from RAQB config and this queryValue) is applied must also be as per the requirement of the operator. valueType: ["multiselect"] } } }
}
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