Skip to content

MPT-18373 Add helpdesk parameter definition services and test scaffolding#244

Merged
jentyk merged 1 commit intomainfrom
feat/MPT-18373
Mar 23, 2026
Merged

MPT-18373 Add helpdesk parameter definition services and test scaffolding#244
jentyk merged 1 commit intomainfrom
feat/MPT-18373

Conversation

@jentyk
Copy link
Member

@jentyk jentyk commented Mar 23, 2026

Summary

  • add helpdesk.parameters sync/async services with endpoint /public/v1/helpdesk/parameters
  • introduce Parameter model and service config in mpt_api_client/resources/helpdesk/parameters.py
  • wire parameters property into Helpdesk and AsyncHelpdesk
  • extend unit coverage for helpdesk module wiring and new parameters resource behavior
  • add e2e scaffolding for helpdesk parameters (sync/async fixtures and CRUD/not-found tests), marked as skipped per request

Testing

  • Not run (not requested)

Closes MPT-18373

  • Add synchronous and asynchronous helpdesk parameter services targeting /public/v1/helpdesk/parameters endpoint with support for CRUD operations and pagination
  • Introduce Parameter model and centralized ParametersServiceConfig with endpoint, model class, and collection key definitions
  • Wire parameters property into Helpdesk and AsyncHelpdesk clients to expose the new parameter services
  • Add unit tests validating that both sync and async parameter services expose expected path attribute and required methods (get, create, update, delete, fetch_page, iterate)
  • Extend helpdesk module unit tests to verify correct wiring of parameters properties in both client types
  • Add end-to-end test scaffolding for helpdesk parameters including reusable fixtures for parameter creation/deletion and CRUD/not-found test cases (marked as skipped per request)

@jentyk jentyk changed the title Add helpdesk parameter definition services and test scaffolding MPT-18373 Add helpdesk parameter definition services and test scaffolding Mar 23, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 31c4c350-282e-4a17-bbf4-7f8e3b2085c2

📥 Commits

Reviewing files that changed from the base of the PR and between a34159c and bc1fcec.

📒 Files selected for processing (8)
  • mpt_api_client/resources/helpdesk/helpdesk.py
  • mpt_api_client/resources/helpdesk/parameters.py
  • tests/e2e/helpdesk/parameters/__init__.py
  • tests/e2e/helpdesk/parameters/conftest.py
  • tests/e2e/helpdesk/parameters/test_async_parameters.py
  • tests/e2e/helpdesk/parameters/test_sync_parameters.py
  • tests/unit/resources/helpdesk/test_helpdesk.py
  • tests/unit/resources/helpdesk/test_parameters.py

📝 Walkthrough

Walkthrough

This pull request introduces a new "Parameters" resource service for the Helpdesk module. It adds parameters property accessors to both Helpdesk and AsyncHelpdesk classes, defines a Parameter model with corresponding sync and async service classes, and includes comprehensive E2E and unit tests for the new functionality.

Changes

Cohort / File(s) Summary
Core Service Accessors
mpt_api_client/resources/helpdesk/helpdesk.py
Added parameters properties to Helpdesk and AsyncHelpdesk that instantiate and return ParametersService and AsyncParametersService respectively.
Parameters Resource Implementation
mpt_api_client/resources/helpdesk/parameters.py
Created new Parameter model, ParametersServiceConfig with endpoint /public/v1/helpdesk/parameters, and corresponding sync/async service classes combining managed-resource, collection, and base service mixins.
E2E Test Infrastructure
tests/e2e/helpdesk/parameters/conftest.py
Added pytest fixtures for E2E tests: parameter_data for standardized payload, invalid_parameter_id for error testing, and created_parameter/async_created_parameter for resource lifecycle management.
E2E Test Cases
tests/e2e/helpdesk/parameters/test_sync_parameters.py, tests/e2e/helpdesk/parameters/test_async_parameters.py
Added comprehensive E2E tests covering get, list, create, update, delete operations and error handling for both sync and async variants with pytest marks for flaky test configuration.
Unit Tests
tests/unit/resources/helpdesk/test_helpdesk.py, tests/unit/resources/helpdesk/test_parameters.py
Extended helpdesk unit tests with parameters attribute assertions and added new test module validating service path and method presence for both sync and async parameter services.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • #227 — Adds chats service accessor to the same Helpdesk and AsyncHelpdesk entrypoint using the identical service pattern.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Jira Issue Key In Title ✅ Passed The PR title contains exactly one Jira issue key in the required format MPT-XXXX. The issue key found is MPT-18373, which follows the proper pattern.
Test Coverage Required ✅ Passed PR includes 2 code files modified in mpt_api_client/resources/helpdesk/ and 5 test files added/modified in tests/ folder with comprehensive unit, fixture, and sync/async coverage.
Single Commit Required ✅ Passed The PR contains exactly one commit (bc1fcec: 'feat: add helpdesk parameter definition api and tests') as confirmed by git history checks.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

@jentyk jentyk marked this pull request as ready for review March 23, 2026 16:56
@jentyk jentyk requested a review from a team as a code owner March 23, 2026 16:56
@jentyk jentyk requested review from alephsur and robcsegal March 23, 2026 16:56
@jentyk jentyk merged commit 0f6655f into main Mar 23, 2026
4 checks passed
@jentyk jentyk deleted the feat/MPT-18373 branch March 23, 2026 18:13
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