Opened 18 months ago

Closed 17 months ago

Last modified 17 months ago

#34655 closed Cleanup/optimization (fixed)

Tests for RadioSelect and Select have diverged considerably, potentially leaving RadioSelect undertested

Reported by: Natalia Bidart Owned by: Jacob1507
Component: Forms Version: 4.2
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Even though Select and RadioSelect both share most of the functionality by inheriting from ChoiceWidget, there are no explicit tests for ChoiceWidget, and tests for Select and RadioSelect have diverged considerably over time.

While some tests will be specific to each children (for their custom code), after inspection when reviewing PR for #34034, there seems to be some tests that were added to Select but not added to their counterpart RadioSelect, for example test_deepcopy.

My hope with this ticket is to either:

  • evaluate the creation of specific tests for ChoiceWidget and have tests for Select and RadioSelect reusing those, and then having custom tests for their custom functionality
  • extend the tests for RadioSelect using those for Select as a guide and have some sort of comment suggesting to grow both test suites when making changes to their parent class.

Change History (8)

comment:1 by Mariusz Felisiak, 18 months ago

Triage Stage: UnreviewedAccepted

For the future, extra test coverage is always welcome, no ticket required.

comment:2 by Jacob1507, 18 months ago

Owner: changed from nobody to Jacob1507
Status: newassigned

Hello, I would like to attempt working on this ticket

comment:3 by Natalia Bidart, 18 months ago

Has patch: set
Patch needs improvement: set

comment:4 by Faishal Manzar, 17 months ago

Owner: changed from Jacob1507 to Faishal Manzar

comment:5 by Mariusz Felisiak, 17 months ago

Owner: changed from Faishal Manzar to Jacob1507
Patch needs improvement: unset

As far as I'm aware, it's waiting for another review by Natalia.

comment:6 by GitHub <noreply@…>, 17 months ago

Resolution: fixed
Status: assignedclosed

In f9c5958:

Fixed #34655 -- Increased radioselect's test coverage.

comment:7 by Natalia Bidart, 17 months ago

Triage Stage: AcceptedReady for checkin

comment:8 by GitHub <noreply@…>, 17 months ago

In 1ad7761:

Refs #34655 -- Made cosmetic edits to RadioSelect tests.

Follow up to f9c5958b8fe452983122b6a13c8f806e4e4e1eef.

Note: See TracTickets for help on using tickets.
Back to Top