test: add E2E tests for routing form attribute conditions#27681
Merged
hariombalhara merged 7 commits intomainfrom Feb 9, 2026
Merged
test: add E2E tests for routing form attribute conditions#27681hariombalhara merged 7 commits intomainfrom
hariombalhara merged 7 commits intomainfrom
Conversation
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
…on 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>
…ibutes 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>
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
…_prepareAssignmentData from main) Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
Member
|
@joeauyeung There were some e2e tests in basic.e2e.ts, so we could change the PR description. Also, we might want to move those tests too to the new test file. |
hariombalhara
approved these changes
Feb 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds comprehensive E2E tests for routing forms with attribute conditions. Previously there were no E2E tests that set up a routing form with
attributesQueryValueconditions and verified routing to a specific event type based on team member attributes.The tests use database seeding via Prisma to create the full test fixture: org → sub-team → round-robin event type → attribute → attribute assignment → routing form with attribute condition routes. Each test submits the form via the route-builder preview UI and verifies routing with dual assertions: URL parameter check (
cal.routedTeamMemberIds) and UI verification (organizer email in results).This includes tests for exclusion operators with no attribute assigned (e.g.
select_not_equals,multiselect_not_some_in,not_equal,not_like,not_between), which exercise the fix from #27669.Coverage (35 E2E tests)
select_equals(match + no-match),select_not_equals(match + no-match + no attribute assigned)multiselect_some_in(match + no-match),multiselect_not_some_in(match + no attribute assigned),multiselect_equals(match),multiselect_not_equals(match + no attribute assigned)equal(match + no-match),not_equal(match + no attribute assigned),less,less_or_equal,greater,greater_or_equal,between(match + no-match),not_between(match + no attribute assigned)equal(match + no-match),not_equal(match + no attribute assigned),like,not_like(match + no attribute assigned),starts_with,is_empty(match when no assignment),is_not_emptyMandatory Tasks (DO NOT REMOVE)
How should this be tested?
Run the E2E tests locally:
All 35 E2E tests should pass.
Human Review Checklist
RAQB JSON structure — The
attributesQueryValueis manually constructed insetupTest(). Verify it matches the format the UI produces."No attribute assigned" test expectations — These tests rely on the fix from fix: Exclusion attribute filter #27669 (
_prepareAssignmentDataiteratingallTeamMemberIds). Verify the assertions are correct for each exclusion operator.is_emptybehavior — Test expectsis_emptyto match users with no attribute assignment. Verify this is the correct product behavior.Link to Devin run: https://app.devin.ai/sessions/7e4fb3908f5947428a65ff85af6e1476
Requested by: @joeauyeung
Checklist