Skip to content

fix: resolve E2E failures, CodeQL warnings, and debug cleanup#216

Merged
therealbrad merged 10 commits intomainfrom
fix/e2e-failures
Apr 16, 2026
Merged

fix: resolve E2E failures, CodeQL warnings, and debug cleanup#216
therealbrad merged 10 commits intomainfrom
fix/e2e-failures

Conversation

@therealbrad
Copy link
Copy Markdown
Contributor

Summary

Fixes 66 of 70 E2E test failures plus 46 CodeQL quality warnings and removes leftover debug logging.

Changes

CodeQL quality fixes (46 warnings)

  • Replace redundant open={var !== null} with open={true} in 39 guarded modal renders
  • Remove trivial conditionals, unused variables, unknown directives, useless comparisons

E2E root cause fixes

  • Session/milestone/case create: Optional relation fields sent as undefined serialized to null by ZenStack. Fixed with conditional spread.
  • Session form reset race: Consolidated two useEffects into single guarded effect with formInitRef.
  • Step creation (ACL-06): Added steps to fast-path create with indirect project resolution via testCase lookup.
  • SelectItem empty value: Changed loading placeholders to value=__loading for Radix UI v2.2.x.
  • Prompt config tests: Added missing generate_from_url features.
  • Pagination tests: Direct URL navigation instead of flaky folder-tree clicks.
  • User profile cache: Added invalidateSessionUserCache() after user update.
  • Folder error detection: Match ZenStack error format for unique constraint violations.
  • Submit button guards: Disable Create until async data loads.
  • Combobox pagination: Scoped Next button selector.

Debug code cleanup

  • Removed unguarded console.log from 6 production files

Test plan

  • E2E: 1040 passed, 5 failed (down from 70), 4 are pre-existing flakes
  • ACL-06 step creation confirmed passing via fast path
  • Session lifecycle (all 4 tests) passing
  • Prompt config tests passing
  • Pagination tests (all 10) passing
  • Manual: verify Add Session and Duplicate Session flows

Generated with Claude Code

therealbrad and others added 10 commits April 15, 2026 22:22
- Remove useless comparison (i > 0 always true in loop body)
- Remove unused editorNode variable in SlashCommand onUpdate
- Add type import for ExtendedIntegration
- Fix bare string expressions in test stubs (missing return)
- Remove redundant open={var !== null} in 39 admin modal guards
- Remove redundant null check after early return in health score calc
- Remove redundant open checks in AddTestRunModal useEffect

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ous worker scripts

- Standardized console log messages for tenant configuration loading and error handling across multiple worker files.
- Enhanced readability by restructuring long lines and ensuring consistent indentation.
- Updated error messages to provide clearer context for failures in tenant configuration loading and Elasticsearch operations.

This refactor aims to improve code maintainability and clarity without altering functionality.
- Fix session cache not invalidated after user profile update
- Fix folder duplicate name error detection for ZenStack error format
- Disable submit buttons until async data loads (sessions, milestones,
  test cases) to prevent race condition with undefined template/workflow
- Scope combobox pagination "Next" button selector to avoid wizard
  button ambiguity in E2E test
- Apply prettier formatting to files from main merge

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…session modals

- Simplified the connection logic for parent milestones in AddMilestoneModal.
- Enhanced the AddSessionModal by using spread operators for conditional connections, improving readability and maintainability.
- Added logging for error responses in the API route handler to aid debugging during create/upsert operations.

These changes improve code clarity and error tracking without altering existing functionality.
…ous worker scripts

- Remove debug console.log statements from automationImports,
  magic-select-cases, test-results import, aiExportActions,
  testmoImportWorker, and syncWorker
- Remove temporary MODEL API ERROR logging from model handler
- Fix pagination E2E tests: navigate directly via URL params
  (?node=ID&pageSize=10) instead of flaky folder-tree clicks
- Fix search-filter pagination tests with same URL param approach

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add missing generate_from_url and generate_from_url_app features to
  prompt config test data (form validation requires all features to have
  non-empty systemPrompt)
- Switch ACL-06 step creation test from scalar FK to relation connect
  syntax for ZenStack policy evaluation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nd testmoImportWorker

- Eliminated debug logging related to issue creation and update in syncWorker.
- Removed verbose logging for multiple Testmo cases mapping in testmoImportWorker to streamline output and improve code clarity.

These changes enhance the maintainability of the worker scripts by reducing clutter in the logs.
- Consolidate AddSessionModal form init into single guarded useEffect
  with formInitRef to prevent async data loading from wiping user input
  (fixes "Name must be at least 2 characters" on session create with
  config+milestone)
- Add steps to fast-path create models with indirect project resolution
  via testCase lookup (bypasses ZenStack policy evaluation bug for
  deep relation chains during create operations)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@therealbrad therealbrad merged commit 9d81d8d into main Apr 16, 2026
5 checks passed
@therealbrad therealbrad deleted the fix/e2e-failures branch April 16, 2026 15:56
@therealbrad
Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 0.21.17 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

clFaster pushed a commit to clFaster/testplanit that referenced this pull request Apr 25, 2026
## [0.21.17](TestPlanIt/testplanit@v0.21.16...v0.21.17) (2026-04-16)

### Bug Fixes

* resolve E2E failures, CodeQL warnings, and debug cleanup ([TestPlanIt#216](TestPlanIt#216)) ([9d81d8d](TestPlanIt@9d81d8d))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant