Skip to content

test: add missing negation operator tests for TEXT, NUMBER, and compound rules#27690

Merged
Udit-takkar merged 8 commits intomainfrom
devin/1770364221-add-missing-negation-tests
Feb 17, 2026
Merged

test: add missing negation operator tests for TEXT, NUMBER, and compound rules#27690
Udit-takkar merged 8 commits intomainfrom
devin/1770364221-add-missing-negation-tests

Conversation

@hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented Feb 6, 2026

What does this PR do?

Adds additional integration test coverage for the exclusion/negation attribute filter regression fixed in #27669. During review of that PR, the following test gaps were identified:

  1. TEXT type negation operatorsnot_equal and not_like with users who have no TEXT attribute assigned
  2. NUMBER type negation operatorsnot_equal with users who have no NUMBER attribute assigned
  3. Compound rules with partial attribute presence — a positive rule AND a negation rule where a user has one attribute but is missing the other (negated) one
  4. Multiple negation rules — two select_not_equals rules where users are missing different attributes

These 5 new tests complement the 8 tests added in #27669 (which covered SINGLE_SELECT and MULTI_SELECT negation operators).

No production code changes — test-only.

Updates since last revision

  • Resolved merge conflicts with main (the test file was renamed from .test.ts to .integration-test.ts on main)
  • Converted all 5 new tests from unit-test style (mocked scenarios, hardcoded userIds) to integration-test style (real DB via createAttributesScenario, dynamic createdUsers[n].userId, testFixtures.team.id/testFixtures.org.id)
  • Reverted non-intentional changes to AddMembersWithSwitch.tsx — the diff now contains only test additions

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A — test-only change.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Run the integration test file:

TZ=UTC VITEST_MODE=integration yarn test packages/features/routing-forms/lib/findTeamMembersMatchingAttributeLogic.integration-test.ts

All tests should pass, including the 5 new ones for TEXT/NUMBER negation and compound rules.

Things for reviewer to verify

  • TEXT and NUMBER attributes define explicit options in the test to work with createAttributesScenario's option-to-user mapping. Verify this accurately represents how these attribute types store values in production.
  • The TEXT tests use buildQueryValue directly (instead of buildSelectTypeFieldQueryValue) because TEXT/NUMBER fields need valueType: ["text"]/["number"] rather than the default ["select"].
  • NUMBER attribute values are stored as strings ("5", "10") in the scenario, which matches how the system processes them through caseInsensitive(getValueOfAttributeOption(...)). Confirm this is accurate.
  • The compound-rule tests assume RAQB defaults to AND conjunction when properties.conjunction is not explicitly set in the query value. Confirm this matches production behavior.

Link to Devin run: https://app.devin.ai/sessions/cf62bcf87df84468b26928d8681738ee
Requested by: @hariombalhara


Open with Devin

@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Base automatically changed from fix-exclusion-attribute-filter to main February 6, 2026 14:06
@pull-request-size pull-request-size bot added size/XL and removed size/L labels Feb 6, 2026
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
@pull-request-size pull-request-size bot added size/L and removed size/XL labels Feb 9, 2026
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
@hariombalhara hariombalhara self-assigned this Feb 10, 2026
@hariombalhara hariombalhara added this to the v6.2 milestone Feb 10, 2026
@hariombalhara hariombalhara marked this pull request as ready for review February 10, 2026 10:01
@graphite-app graphite-app bot added enterprise area: enterprise, audit log, organisation, SAML, SSO core area: core, team members only labels Feb 10, 2026
@graphite-app graphite-app bot requested a review from a team February 10, 2026 10:01
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@CarinaWolli CarinaWolli modified the milestones: v6.2, v6.3 Feb 17, 2026
@github-actions
Copy link
Contributor

E2E results are ready!

@Udit-takkar Udit-takkar merged commit 11b65b2 into main Feb 17, 2026
79 of 82 checks passed
@Udit-takkar Udit-takkar deleted the devin/1770364221-add-missing-negation-tests branch February 17, 2026 15:45
emrysal pushed a commit that referenced this pull request Feb 18, 2026
…und rules (#27690)

* Fix exclusion filter - include all team members

* Fix display when members aren't saved in the DB

* Update tests

* test: add missing negation operator tests for TEXT, NUMBER, and compound rules

Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>

* fix: revert non-intentional changes to AddMembersWithSwitch.tsx

Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>

---------

Co-authored-by: Joe Au-Yeung <j.auyeung419@gmail.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO ready-for-e2e size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments