Skip to content

MPT-19483 E2E: Helpdesk Answers#288

Merged
jentyk merged 2 commits intomainfrom
feat/MPT-19483
Apr 7, 2026
Merged

MPT-19483 E2E: Helpdesk Answers#288
jentyk merged 2 commits intomainfrom
feat/MPT-19483

Conversation

@jentyk
Copy link
Copy Markdown
Member

@jentyk jentyk commented Apr 7, 2026

Closes MPT-19483

  • Remove ChatAnswerParameter model and ChatAnswerParametersService / AsyncChatAnswerParametersService (endpoint: /public/v1/helpdesk/chats/{chat_id}/answers/{answer_id}/parameters)
  • Remove parameters(...) helper methods from ChatAnswersService and AsyncChatAnswersService
  • Update E2E tests: add form fixtures (form_data, created_form, created_published_form and async variants) and change chat answer fixtures to use created_chat and include serialized published form when creating answers
  • Add submitted_chat_answer and async_submitted_chat_answer fixtures; update tests to accept/operate on submitted answers
  • Consolidate form fixture logic into tests/e2e/helpdesk/conftest.py and remove tests/e2e/helpdesk/forms/conftest.py
  • Delete E2E and unit tests and fixtures that targeted the removed chat answer parameters service (tests for sync/async parameters and their conftest)

@jentyk jentyk requested a review from a team as a code owner April 7, 2026 11:00
@jentyk jentyk requested review from alephsur and d3rky April 7, 2026 11:00
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 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: 31f4f819-28f5-4cfe-8fa5-439bfdf4283b

📥 Commits

Reviewing files that changed from the base of the PR and between f715ec3 and 0158a11.

📒 Files selected for processing (12)
  • mpt_api_client/resources/helpdesk/chat_answer_parameters.py
  • mpt_api_client/resources/helpdesk/chat_answers.py
  • tests/e2e/helpdesk/chats/answers/conftest.py
  • tests/e2e/helpdesk/chats/answers/parameters/conftest.py
  • tests/e2e/helpdesk/chats/answers/parameters/test_async_parameters.py
  • tests/e2e/helpdesk/chats/answers/parameters/test_sync_parameters.py
  • tests/e2e/helpdesk/chats/answers/test_async_answers.py
  • tests/e2e/helpdesk/chats/answers/test_sync_answers.py
  • tests/e2e/helpdesk/conftest.py
  • tests/e2e/helpdesk/forms/conftest.py
  • tests/unit/resources/helpdesk/test_chat_answer_parameters.py
  • tests/unit/resources/helpdesk/test_chat_answers.py
💤 Files with no reviewable changes (8)
  • tests/unit/resources/helpdesk/test_chat_answers.py
  • tests/e2e/helpdesk/chats/answers/parameters/test_sync_parameters.py
  • tests/unit/resources/helpdesk/test_chat_answer_parameters.py
  • tests/e2e/helpdesk/chats/answers/parameters/test_async_parameters.py
  • mpt_api_client/resources/helpdesk/chat_answers.py
  • tests/e2e/helpdesk/chats/answers/parameters/conftest.py
  • mpt_api_client/resources/helpdesk/chat_answer_parameters.py
  • tests/e2e/helpdesk/forms/conftest.py
🚧 Files skipped from review as they are similar to previous changes (4)
  • tests/e2e/helpdesk/chats/answers/test_sync_answers.py
  • tests/e2e/helpdesk/conftest.py
  • tests/e2e/helpdesk/chats/answers/conftest.py
  • tests/e2e/helpdesk/chats/answers/test_async_answers.py

📝 Walkthrough

Walkthrough

Removed the ChatAnswerParameter model and its sync/async services, removed the .parameters(answer_id) accessors from ChatAnswers services, deleted related unit and E2E tests, and moved/added form creation/publishing and submitted-answer fixtures into the helpdesk E2E conftest.

Changes

Cohort / File(s) Summary
Helpdesk API Model & Service Removal
mpt_api_client/resources/helpdesk/chat_answer_parameters.py, mpt_api_client/resources/helpdesk/chat_answers.py
Deleted ChatAnswerParameter, ChatAnswerParametersService, AsyncChatAnswerParametersService; removed parameters(answer_id) methods from ChatAnswersService/AsyncChatAnswersService.
E2E Test Fixture Reorganization
tests/e2e/helpdesk/conftest.py, tests/e2e/helpdesk/chats/answers/conftest.py
Added form fixtures (form_data, invalid_form_id), sync/async created & published form fixtures, updated chat-answer fixtures to use created_chat, included serialized form in answer payloads, and added submitted_chat_answer/async_submitted_chat_answer.
Removed Dedicated Forms Fixtures
tests/e2e/helpdesk/forms/conftest.py
Deleted file; form-related fixtures were relocated into the parent helpdesk conftest.
E2E Parameter Tests Deletion
tests/e2e/helpdesk/chats/answers/parameters/conftest.py, tests/e2e/helpdesk/chats/answers/parameters/test_sync_parameters.py, tests/e2e/helpdesk/chats/answers/parameters/test_async_parameters.py
Removed parameter-service fixtures and both sync/async E2E test modules for chat answer parameters.
E2E Answer Tests Updates
tests/e2e/helpdesk/chats/answers/test_sync_answers.py, tests/e2e/helpdesk/chats/answers/test_async_answers.py
Removed module-level skip marks, added usefixtures for created chat answers, and changed accept tests to use submitted-answer fixtures.
Unit Tests Deletion / Updates
tests/unit/resources/helpdesk/test_chat_answer_parameters.py, tests/unit/resources/helpdesk/test_chat_answers.py
Deleted unit tests for chat_answer_parameters; removed expectations and tests asserting a parameters sub-resource from chat answers unit tests.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Single Commit Required ⚠️ Warning PR contains 2 commits but should contain only 1; the second commit (914a22d) appears unrelated to MPT-19483. Squash commits into a single commit or rebase to remove the extraneous commit (914a22d) from a different PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Jira Issue Key In Title ✅ Passed The PR title contains exactly one Jira issue key (MPT-19483) in the correct format at the beginning.
Test Coverage Required ✅ Passed PR modifies 2 code files in mpt_api_client/ and includes comprehensive changes to 8 corresponding test files in tests/ folder.

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

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/e2e/helpdesk/conftest.py`:
- Around line 123-125: The fixtures created_published_form and
async_created_published_form call
mpt_ops.helpdesk.forms.publish(created_form.id) but return the original
created_form (stale); update each fixture to publish then retrieve and return
the freshly published form object (e.g., call the helpdesk forms GET method or
equivalent like mpt_ops.helpdesk.forms.get(created_form.id) and await it in the
async fixture) so downstream consumers receive the up-to-date published form.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 76358c12-f5dc-4a51-bfea-41e4189324da

📥 Commits

Reviewing files that changed from the base of the PR and between b1e8900 and 3db3d97.

📒 Files selected for processing (13)
  • mpt_api_client/resources/helpdesk/chat_answer_parameters.py
  • mpt_api_client/resources/helpdesk/chat_answers.py
  • tests/e2e/helpdesk/chats/answers/conftest.py
  • tests/e2e/helpdesk/chats/answers/parameters/__init__.py
  • tests/e2e/helpdesk/chats/answers/parameters/conftest.py
  • tests/e2e/helpdesk/chats/answers/parameters/test_async_parameters.py
  • tests/e2e/helpdesk/chats/answers/parameters/test_sync_parameters.py
  • tests/e2e/helpdesk/chats/answers/test_async_answers.py
  • tests/e2e/helpdesk/chats/answers/test_sync_answers.py
  • tests/e2e/helpdesk/conftest.py
  • tests/e2e/helpdesk/forms/conftest.py
  • tests/unit/resources/helpdesk/test_chat_answer_parameters.py
  • tests/unit/resources/helpdesk/test_chat_answers.py
💤 Files with no reviewable changes (8)
  • tests/unit/resources/helpdesk/test_chat_answer_parameters.py
  • tests/unit/resources/helpdesk/test_chat_answers.py
  • tests/e2e/helpdesk/chats/answers/parameters/test_sync_parameters.py
  • mpt_api_client/resources/helpdesk/chat_answers.py
  • tests/e2e/helpdesk/chats/answers/parameters/conftest.py
  • mpt_api_client/resources/helpdesk/chat_answer_parameters.py
  • tests/e2e/helpdesk/forms/conftest.py
  • tests/e2e/helpdesk/chats/answers/parameters/test_async_parameters.py

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

@jentyk jentyk merged commit 1879878 into main Apr 7, 2026
4 checks passed
@jentyk jentyk deleted the feat/MPT-19483 branch April 7, 2026 14:06
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