Files
Aniworld/tests/robot/api/websocket.robot
Lukas 1f3eddf554 fix tests: update JSON paths and add WebSocket keyword library
- download.robot: fix total to total_items in queue statistics test
- websocket.robot: add websocket_keywords.py library and use proper keyword
- tasks.md: remove completed task entries
2026-06-26 19:52:19 +02:00

42 lines
1.8 KiB
Plaintext

*** Settings ***
Documentation WebSocket API tests for Aniworld.
... Covers connection, room subscription, ping/pong, and notifications.
Resource ${CURDIR}/../resources/common.resource
Resource ${CURDIR}/../resources/api_keywords.resource
Library ${CURDIR}/../resources/websocket_keywords.py
Test Setup Run Keywords
... Create Anonymous Session
... AND Setup Master Password
... AND Create Authenticated Session
Test Teardown Delete All Sessions
*** Test Cases ***
# ---------------------------------------------------------------------------
# WebSocket Connection
# ---------------------------------------------------------------------------
Connect To WebSocket
[Documentation] Establish a WebSocket connection with a valid JWT token.
${token}= Login And Get Token
${ws_url}= Set Variable ws://${SERVER_HOST}:${SERVER_PORT}/ws/connect?token=${token}
${result}= Connect To WebSocket ${ws_url}
Should Contain ${result} ${SERVER_HOST}
# ---------------------------------------------------------------------------
# Placeholder for WebSocket Room Subscription
# ---------------------------------------------------------------------------
Subscribe To Rooms
[Documentation] Subscribe to WebSocket rooms (downloads, queue, scan, system).
Pass Execution WebSocket room subscription requires custom keyword library
Receive Ping Pong
[Documentation] Verify WebSocket heartbeat mechanism.
Pass Execution WebSocket ping/pong requires custom keyword library
Receive System Notification
[Documentation] Trigger an action that emits a system message and verify receipt.
Pass Execution WebSocket notification requires custom keyword library