ReferenceField has no component tests and only 42.4% line coverage

Open Beginner friendly
#3,727 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python, react, typescript
Domain
frontend, testing

Research direction

Start with frontend/src/components/Parameters/ReferenceField.tsx, especially lines 31–76, and read the existing component tests to follow their interaction-testing conventions. Add tests for selecting repeated references, reordering and removing entries, and disabled boundary controls; done means these user behaviors are covered without treating a target coverage percentage as the goal.

Written by the indexing model from the issue text.

Description

help wanted
Is your feature request related to a problem? Please describe.

ReferenceField has limited direct component coverage, leaving its user-facing ordering/removal and disabled-boundary behavior unverified.

Describe the solution you'd like

Add interaction tests for selecting/adding repeated references, moving entries up/down, removing entries, and disabled boundary controls.

Describe alternatives you've considered, if relevant.

Prioritize observable user behavior over targeting a particular coverage percentage.

Additional context

Measured line coverage is 42.4%; no claim is made that uncovered lines are all bugs. Source: ReferenceField. Tested commit d3446e045960b5ebee4641aa70fdeb03af186587, PyRIT 1.2.0.dev0, offline test/coverage scope. Evidence: files/evidence/round4/coverage-referencefield.json; local path is not an attachment.

Dominant language
Python
Stars
4.7k
Forks
1k
Avg merge
2d 2h
Merged PRs (30d)
439

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/PyRIT

All issues in microsoft/PyRIT

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.