Skip to content

PM-5802: show test flag in advanced options - #2101

Merged
jmgasper merged 1 commit into
devfrom
PM-5802
Aug 4, 2026
Merged

PM-5802: show test flag in advanced options#2101
jmgasper merged 1 commit into
devfrom
PM-5802

Conversation

@jmgasper

@jmgasper jmgasper commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

What was broken

The earlier PM-5802 implementation added test-challenge metadata handling and the Work Manager checkbox, but saved challenges displayed the checkbox in Basic Information instead of the required Advanced Options section. QA therefore could not find the test challenge flag in the section shown in the failure screenshot.

Root cause

TestChallengeField was mounted unconditionally in the Basic Information grid. The existing component tests queried the checkbox globally, so they verified its value but did not catch the incorrect section placement.

What was changed

  • Keep the checkbox in Basic Information only before the initial challenge save, preserving atomic is_test_challenge metadata on creation.
  • Show the checkbox in Advanced Options after the challenge has been created, including edit and read-only views.
  • Update the challenge editor documentation to describe the two-stage placement.
  • Leave the already-correct Challenge API and Finance API behavior unchanged; exact is_test_challenge=true challenges continue to skip payment creation.

Any added/updated tests

  • Updated ChallengeEditorForm regression coverage to verify persisted true metadata renders checked inside Advanced Options and does not render in Basic Information for an existing challenge.
  • yarn test:no-watch --runTestsByPath src/apps/work/src/pages/challenges/ChallengeEditorPage/components/ChallengeEditorForm.spec.tsx --testNamePattern='test challenge' --silent — passed, 3 tests.
  • yarn lint — passed.
  • yarn run build — passed with existing warnings.
  • yarn test:no-watch --silent — 201 suites and 999 tests passed; 18 suites and 32 tests failed. An untouched origin/dev worktree produced the exact same failures and totals, confirming this change introduced no test regressions.

What was broken
The Test Challenge checkbox added by the earlier PM-5802 implementation was not shown in Work Manager's Advanced Options section.

Root cause
The field was rendered unconditionally in Basic Information, and its tests only queried the page globally instead of checking the required section.

What was changed
Keep the checkbox in Basic Information before the first save so the test metadata can be sent on initial creation, then render it in Advanced Options for saved challenges. Update the challenge editor documentation to describe the two-stage placement.

Any added/updated tests
Update ChallengeEditorForm coverage to verify a persisted test flag is checked in Advanced Options and absent from Basic Information on edit. The focused PM-5802 tests, lint, and production build pass; the full suite retains the same pre-existing failures as origin/dev.
@jmgasper
jmgasper requested a review from kkartunov as a code owner August 3, 2026 20:34
@jmgasper
jmgasper merged commit 28a2afa into dev Aug 4, 2026
7 checks passed
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.

1 participant