Files
qwenpaw/e2e/tests/test_cov_chat_sessions_deep.py
agent-radar 1a3a4ccde1
Creator App Tests / PR Spam Gate (push) Skipped
Frontend Tests / PR Spam Gate (push) Skipped
NPM Format (website & console) / PR Spam Gate (push) Skipped
Pre-commit Checks / PR Spam Gate (push) Skipped
QwenPaw Creator Plugin Release / check-version (push) Canceled after 0s
QwenPaw Creator Plugin Release / upload-oss (push) Canceled after 0s
Tests / PR Spam Gate (push) Skipped
CodeQL / CodeQL (python) (push) Canceled after 0s
CodeQL / CodeQL (typescript) (push) Canceled after 0s
Creator App Tests / Creator Backend Tests (push) Canceled after 0s
Creator App Tests / Creator UI Build & Tests (push) Canceled after 0s
E2E Smoke Tests / Playwright UI Smoke (push) Canceled after 0s
Frontend Tests / Detect console changes (push) Canceled after 0s
NPM Format (website & console) / website format check (push) Canceled after 0s
NPM Format (website & console) / console format check (push) Canceled after 0s
Pre-commit Checks / Pre-commit (push) Canceled after 0s
QwenPaw Data Plugin Release / check-version (push) Canceled after 0s
Tests / Detect code changes (push) Canceled after 0s
Frontend Tests / Vitest Unit Tests (push) Canceled after 0s
Frontend Tests / Frontend Summary (push) Canceled after 0s
QwenPaw Data Plugin Release / upload-oss (push) Canceled after 0s
Tests / Maintainer Approval (push) Canceled after 0s
Tests / Unit Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - fallback (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p2 (push) Canceled after 0s
Tests / Coverage Report (push) Canceled after 0s
Tests / Test Summary (push) Canceled after 0s
源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
2026-09-01 20:01:50 +08:00

80 lines
2.6 KiB
Python

# -*- coding: utf-8 -*-
"""
Deep chat session archive/batch flows for coverage boost (Plan B).
Targets: Chat Console & Session (7,977 uncovered lines) — archive,
batch delete, filter, load flows via sidebar + sessions API.
Run: pytest tests/test_cov_chat_sessions_deep.py -v
"""
from __future__ import annotations
import logging
import pytest
from pages.chat_page import ChatPage
from utils.helpers import log_test_step, log_test_result
logger = logging.getLogger(__name__)
@pytest.mark.integration
@pytest.mark.p1
@pytest.mark.chat
class TestChatSessionArchiveBatchDeep:
"""
COV-CS-001: Create sessions -> archive -> batch delete -> verify.
Coverage: session archive/load, batch operations, sidebar grouping.
"""
@pytest.mark.test_id("COV-CS-001")
def test_session_archive_batch_deep(
self, clean_chat_page: ChatPage, request: pytest.FixtureRequest
):
test_name = request.node.name
log_test_step("1. Create two sessions")
clean_chat_page.open()
clean_chat_page.create_new_chat()
clean_chat_page.send_message("first session ping")
clean_chat_page.wait_for_ai_response(timeout=60000)
clean_chat_page.create_new_chat()
clean_chat_page.send_message("second session ping")
clean_chat_page.wait_for_ai_response(timeout=60000)
log_test_step("2. Open session list")
clean_chat_page.open_session_list()
count = clean_chat_page.get_session_count()
logger.info(f"Session count: {count}")
assert count >= 2, "Expected at least 2 sessions"
log_test_step("3. Search sessions")
clean_chat_page.search_sessions("ping")
clean_chat_page.page.wait_for_timeout(1500)
clean_chat_page.clear_session_search()
clean_chat_page.page.wait_for_timeout(1000)
log_test_step("4. Rename last session (drives update path)")
try:
clean_chat_page.rename_session(0, "e2e-cov-renamed")
logger.info("Rename done")
except Exception as exc:
logger.warning(f"Rename not drivable: {exc}")
log_test_step("5. Delete the two created sessions (teardown)")
for _ in range(2):
try:
clean_chat_page.delete_session(0)
clean_chat_page.page.wait_for_timeout(1000)
except Exception as exc:
logger.warning(f"Delete not drivable: {exc}")
break
log_test_step("6. Close session list")
clean_chat_page.close_session_list()
log_test_result(test_name, True, 0)
logger.info(f"Test {test_name} passed")