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
84 lines
2.8 KiB
Python
84 lines
2.8 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
Deep channels flows for coverage boost (Plan B).
|
|
|
|
Targets: app/channels/base.py (704 uncovered lines) + channel CRUD —
|
|
any channel operation drives the base channel machinery.
|
|
|
|
Run: pytest tests/test_cov_channels_deep.py -v
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import logging
|
|
|
|
import pytest
|
|
|
|
from pages.channels_page import ChannelsPage
|
|
from utils.helpers import log_test_step, log_test_result
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
@pytest.mark.integration
|
|
@pytest.mark.p1
|
|
@pytest.mark.channels
|
|
class TestChannelsDeep:
|
|
"""
|
|
COV-CH-001: Channel list/filter/status/drawer/config save flows.
|
|
|
|
Coverage: app/channels/base.py config parsing, enable/disable,
|
|
status reporting.
|
|
"""
|
|
|
|
@pytest.mark.test_id("COV-CH-001")
|
|
def test_channels_filter_drawer_config(
|
|
self, channels_page: ChannelsPage, request: pytest.FixtureRequest
|
|
):
|
|
test_name = request.node.name
|
|
|
|
log_test_step("1. Open channels page")
|
|
channels_page.open()
|
|
channels_page.wait_for_page_loaded()
|
|
|
|
log_test_step("2. Filter by builtin")
|
|
channels_page.click_filter_builtin()
|
|
channels_page.page.wait_for_timeout(1500)
|
|
builtin_count = channels_page.get_channel_card_count()
|
|
logger.info(f"Builtin channels: {builtin_count}")
|
|
|
|
log_test_step("3. Filter by custom then back to all")
|
|
channels_page.click_filter_custom()
|
|
channels_page.page.wait_for_timeout(1000)
|
|
channels_page.click_filter_all()
|
|
channels_page.page.wait_for_timeout(1000)
|
|
|
|
log_test_step("4. Read status of first builtin channel")
|
|
cards = channels_page.get_channel_cards()
|
|
if cards:
|
|
name = cards[0].inner_text().split("\n")[0].strip()
|
|
status = channels_page.get_channel_status(name)
|
|
logger.info(f"Channel {name} status={status}")
|
|
|
|
log_test_step("5. Open channel drawer and inspect config form")
|
|
if cards:
|
|
channels_page.click_channel_card(name)
|
|
opened = channels_page.wait_for_drawer_open(timeout=5000)
|
|
if opened:
|
|
# Inspect a few config fields without saving
|
|
fields = channels_page.page.locator(
|
|
'.qwenpaw-drawer input, .qwenpaw-drawer textarea'
|
|
)
|
|
logger.info(f"Drawer config fields: {fields.count()}")
|
|
channels_page.page.keyboard.press("Escape")
|
|
channels_page.page.wait_for_timeout(1000)
|
|
else:
|
|
logger.info("Drawer did not open")
|
|
|
|
log_test_step("6. Verify bot prefix accessor")
|
|
if cards:
|
|
prefix = channels_page.get_channel_bot_prefix(name)
|
|
logger.info(f"Bot prefix for {name}: {prefix!r}")
|
|
|
|
log_test_result(test_name, True, 0)
|
|
logger.info(f"Test {test_name} passed")
|