Skip to content

MPT-19488 merge chat message fixtures and unskip link tests#269

Merged
jentyk merged 1 commit intomainfrom
feat/MPT-19488
Apr 2, 2026
Merged

MPT-19488 merge chat message fixtures and unskip link tests#269
jentyk merged 1 commit intomainfrom
feat/MPT-19488

Conversation

@jentyk
Copy link
Copy Markdown
Member

@jentyk jentyk commented Apr 2, 2026

Closes MPT-19488

  • Consolidated chat message fixtures: moved/merged fixtures into tests/e2e/helpdesk/chats/conftest.py (added chat_messages_service, async_chat_messages_service, chat_message_data, created_chat_message, async_created_chat_message, invalid_chat_message_id)
  • Removed obsolete tests/e2e/helpdesk/chats/messages/conftest.py (fixtures deleted from that file)
  • Updated chat link fixtures and services to use created chats/messages: chat_link_data now includes the created message; chat_links_service/async_chat_links_service now construct clients from created_chat.id
  • Added created_chat_link_service and async_created_chat_link_service fixtures to provide link-backed service instances scoped to created link/chat
  • Re-enabled previously skipped E2E chat link tests (sync & async): test_list_chat_links, test_create_chat_link, test_update_chat_link_name, test_delete_chat_link; updated list tests to use created_chat_link_service / async_created_chat_link_service and call fetch_page(limit=1)
  • Added flake8 per-file-ignores for tests/e2e/helpdesk/chats/links/*.py to suppress WPS221 and WPS202
  • Formatting-only updates to pyproject.toml (reformatted arrays/lists and ruff/flake8/pytest/coverage entries); no functional dependency or behavior changes

@jentyk jentyk requested a review from a team as a code owner April 2, 2026 08:57
@jentyk jentyk requested review from d3rky and svazquezco April 2, 2026 08:57
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 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: 54fa1a12-c830-4c2a-9456-0fe6a88f5f47

📥 Commits

Reviewing files that changed from the base of the PR and between a65ea6d and 7e9f6f6.

📒 Files selected for processing (6)
  • pyproject.toml
  • tests/e2e/helpdesk/chats/conftest.py
  • tests/e2e/helpdesk/chats/links/conftest.py
  • tests/e2e/helpdesk/chats/links/test_async_links.py
  • tests/e2e/helpdesk/chats/links/test_sync_links.py
  • tests/e2e/helpdesk/chats/messages/conftest.py
💤 Files with no reviewable changes (1)
  • tests/e2e/helpdesk/chats/messages/conftest.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • pyproject.toml
  • tests/e2e/helpdesk/chats/conftest.py

📝 Walkthrough

Walkthrough

Consolidates chat-message fixtures into the parent chats conftest, deletes the messages subdirectory conftest, adds/rewires sync/async chat message and link fixtures, unskips several chat-link E2E tests, and reformats/adjusts entries in pyproject.toml.

Changes

Cohort / File(s) Summary
Configuration
pyproject.toml
Reformatted project/tool config arrays and added tool.flake8.per-file-ignores for tests/e2e/helpdesk/chats/links/*.py to ignore WPS221 and WPS202.
Chats — new/updated fixtures
tests/e2e/helpdesk/chats/conftest.py
Added sync/async chat-message service fixtures, chat_message_data factory, resource-creation fixtures (created_chat_message, async_created_chat_message), and invalid_chat_message_id.
Messages — removed fixtures
tests/e2e/helpdesk/chats/messages/conftest.py
Deleted file and its fixtures (service fixtures, data factory, created-message fixtures, invalid_chat_message_id).
Links — fixtures and tests
tests/e2e/helpdesk/chats/links/conftest.py, tests/e2e/helpdesk/chats/links/test_sync_links.py, tests/e2e/helpdesk/chats/links/test_async_links.py
Rewired chat_links_service/async_chat_links_service to use created_chat; updated chat_link_data to depend on created_chat_message and include a message field; added created_chat_link_service and async variant; removed pytest.mark.skip from multiple sync/async link tests and updated list-fetch calls to use created-link service fixtures.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

🚥 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 (MPT-19488) in the correct MPT-XXXX format at the beginning.
Test Coverage Required ✅ Passed The PR modifies only configuration metadata (pyproject.toml) and test files exclusively within the tests/ folder. No implementation or code files outside of the test directory were modified.
Single Commit Required ✅ Passed The PR contains exactly one commit (7e9f6f6) that consolidates chat message fixtures and link test changes, maintaining clean git history.

✏️ 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.

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/chats/links/conftest.py`:
- Around line 35-37: The fixture created_chat_link_service yields a scoped
service using a nullable chain chat_link.to_dict().get("chat", {}).get("id")
which can produce None; instead use the concrete chat id available on the
created resource (from chat_link or the resource returned by
create_fixture_resource_and_delete) or yield the already-scoped service used to
create the link to avoid nullable extraction. Update created_chat_link_service
to obtain the chat id directly from the created resource (e.g.
chat_link.chat["id"] or the resource's direct attribute/method) or yield the
existing scoped service, and apply the same change to the other similar fixture
referenced in the comment (the one around lines 49-53).
🪄 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: aaa4db91-8b27-43e9-87b1-a6cea46c11c1

📥 Commits

Reviewing files that changed from the base of the PR and between 78ed68a and f4957ba.

📒 Files selected for processing (6)
  • pyproject.toml
  • tests/e2e/helpdesk/chats/conftest.py
  • tests/e2e/helpdesk/chats/links/conftest.py
  • tests/e2e/helpdesk/chats/links/test_async_links.py
  • tests/e2e/helpdesk/chats/links/test_sync_links.py
  • tests/e2e/helpdesk/chats/messages/conftest.py
💤 Files with no reviewable changes (1)
  • tests/e2e/helpdesk/chats/messages/conftest.py

@jentyk jentyk force-pushed the feat/MPT-19488 branch 2 times, most recently from a65ea6d to ad9603f Compare April 2, 2026 09:28
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/chats/links/test_sync_links.py`:
- Line 18: The test function declaration test_create_chat_link (in
tests/e2e/helpdesk/chats/links/test_sync_links.py) contains an invalid noqa
marker "# noqa: AAA01"; remove that invalid noqa (or replace it with a valid
three-digit AAA code like "AAA001" if you intended to suppress a specific rule)
so Ruff no longer raises RUF102 and normal linting applies to the test function.
🪄 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: 8159e94e-86de-42fd-8db9-f5591c6b7fe8

📥 Commits

Reviewing files that changed from the base of the PR and between f4957ba and a65ea6d.

📒 Files selected for processing (6)
  • pyproject.toml
  • tests/e2e/helpdesk/chats/conftest.py
  • tests/e2e/helpdesk/chats/links/conftest.py
  • tests/e2e/helpdesk/chats/links/test_async_links.py
  • tests/e2e/helpdesk/chats/links/test_sync_links.py
  • tests/e2e/helpdesk/chats/messages/conftest.py
💤 Files with no reviewable changes (1)
  • tests/e2e/helpdesk/chats/messages/conftest.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • pyproject.toml
  • tests/e2e/helpdesk/chats/links/conftest.py

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

@jentyk jentyk merged commit 82dc28b into main Apr 2, 2026
4 checks passed
@jentyk jentyk deleted the feat/MPT-19488 branch April 2, 2026 10:00
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