Skip to content

Comments

Add comprehensive test coverage for contactField permission rules#3913

Merged
stephenhand merged 3 commits intoCHI-3566-contact_field_view_permissionsfrom
copilot/sub-pr-3901-again
Feb 16, 2026
Merged

Add comprehensive test coverage for contactField permission rules#3913
stephenhand merged 3 commits intoCHI-3566-contact_field_view_permissionsfrom
copilot/sub-pr-3901-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Description

Adds test suite for contactField target kind permission evaluation, covering edge cases in field-specific condition filtering logic.

Test Coverage

  • Default allow behavior: Fields without explicit field conditions are permitted by default
  • Global conditions: Non-field-specific conditions (everyone, isSupervisor, isOwner) apply uniformly across all fields
  • Condition filtering: Field-specific conditions are correctly filtered when evaluating permissions for a given field
  • Conflicting field conditions: Condition sets containing multiple field conditions for different fields are properly filtered out, with other condition sets able to override

48 test cases added (24 per action: viewContactField, editContactField)

Checklist

  • Corresponding issue has been opened
  • New tests added
  • Feature flags added
  • Strings are localized
  • Tested for chat contacts
  • Tested for call contacts

Other Related Issues

None

Verification steps

Run the test suite:

cd plugin-hrm-form
npm test -- src/___tests__/permissions/rules.test.ts

All 303 tests should pass.

AFTER YOU MERGE

  1. Cut a release tag using the Github workflow. Wait for it to complete and notify in the #aselo-deploys Slack channel.
  2. Comment on the ticket with the release tag version AND any additional instructions required to configure an environment to test the changes.
  3. Only then move the ticket into the QA column in JIRA

You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 16, 2026 17:12
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Copilot AI changed the title [WIP] Add contact field permission support Add comprehensive test coverage for contactField permission rules Feb 16, 2026
Copilot AI requested a review from stephenhand February 16, 2026 17:16
@stephenhand stephenhand marked this pull request as ready for review February 16, 2026 17:21
@stephenhand stephenhand merged commit 6f7f7fb into CHI-3566-contact_field_view_permissions Feb 16, 2026
26 checks passed
@stephenhand stephenhand deleted the copilot/sub-pr-3901-again branch February 16, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants