Task 24 fix. Robot tests now use Get Element States to check button enabled state, which works reliably. Also added 100ms delay after auth to ensure token availability, and error handling in loadQueueData. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
112 lines
4.7 KiB
Plaintext
112 lines
4.7 KiB
Plaintext
*** Settings ***
|
|
Documentation Queue page UI tests for Aniworld.
|
|
... Covers page load, stats cards, start/stop buttons, clear confirmations, retry all, and navigation.
|
|
|
|
Resource ${CURDIR}/../resources/common.resource
|
|
Resource ${CURDIR}/../resources/ui_keywords.resource
|
|
|
|
Test Setup Run Keywords
|
|
... Create Anonymous Session
|
|
... AND Setup Master Password
|
|
... AND Open Browser To Page /login
|
|
... AND Perform Login
|
|
... AND Navigate To Queue Page
|
|
|
|
Test Teardown Close Browser
|
|
|
|
*** Test Cases ***
|
|
# ---------------------------------------------------------------------------
|
|
# Queue Page Load
|
|
# ---------------------------------------------------------------------------
|
|
Queue Page Loads
|
|
[Documentation] Verify the queue page loads with all sections and stats.
|
|
Page Title Should Contain Queue
|
|
Element Should Be Visible id=total-items
|
|
Element Should Be Visible id=pending-items
|
|
Element Should Be Visible id=completed-items
|
|
Element Should Be Visible id=failed-items
|
|
Element Should Be Visible id=pending-queue
|
|
Element Should Be Visible id=active-downloads
|
|
Element Should Be Visible id=completed-downloads
|
|
Element Should Be Visible id=failed-downloads
|
|
|
|
Queue Stats Cards Display Zero Initially
|
|
[Documentation] Verify all stat cards show 0 when queue is empty.
|
|
${total}= Get Text id=total-items
|
|
Should Be Equal As Strings ${total} 0
|
|
${pending}= Get Text id=pending-items
|
|
Should Be Equal As Strings ${pending} 0
|
|
${completed}= Get Text id=completed-items
|
|
Should Be Equal As Strings ${completed} 0
|
|
${failed}= Get Text id=failed-items
|
|
Should Be Equal As Strings ${failed} 0
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Queue Controls
|
|
# ---------------------------------------------------------------------------
|
|
Start Queue Button
|
|
[Documentation] Click start queue and verify button state changes.
|
|
${states}= Get Element States id=start-queue-btn
|
|
${enabled}= Evaluate 'enabled' in $states
|
|
IF $enabled
|
|
Click id=start-queue-btn
|
|
Wait For Elements State id=stop-queue-btn visible timeout=3s
|
|
END
|
|
|
|
Stop Queue Button
|
|
[Documentation] Click stop queue and verify button state changes.
|
|
${states}= Get Element States id=stop-queue-btn
|
|
${enabled}= Evaluate 'enabled' in $states
|
|
IF $enabled
|
|
Click id=stop-queue-btn
|
|
Wait For Elements State id=start-queue-btn visible timeout=3s
|
|
END
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Clear Operations
|
|
# ---------------------------------------------------------------------------
|
|
Clear Completed Confirmation
|
|
[Documentation] Click clear completed and verify confirmation modal appears.
|
|
${states}= Get Element States id=clear-completed-btn
|
|
${enabled}= Evaluate 'enabled' in $states
|
|
IF $enabled
|
|
Click id=clear-completed-btn
|
|
Element Should Be Visible id=confirm-modal
|
|
Element Text Should Contain id=confirm-modal clear
|
|
Click id=confirm-cancel
|
|
Element Should Be Hidden id=confirm-modal
|
|
END
|
|
|
|
Clear Failed Confirmation
|
|
[Documentation] Click clear failed and verify confirmation modal appears.
|
|
${states}= Get Element States id=clear-failed-btn
|
|
${enabled}= Evaluate 'enabled' in $states
|
|
IF $enabled
|
|
Click id=clear-failed-btn
|
|
Element Should Be Visible id=confirm-modal
|
|
Element Text Should Contain id=confirm-modal clear
|
|
Click id=confirm-cancel
|
|
Element Should Be Hidden id=confirm-modal
|
|
END
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Retry All
|
|
# ---------------------------------------------------------------------------
|
|
Retry All Failed
|
|
[Documentation] Click retry all and verify UI feedback.
|
|
${states}= Get Element States id=retry-all-btn
|
|
${enabled}= Evaluate 'enabled' in $states
|
|
IF $enabled
|
|
Click id=retry-all-btn
|
|
Toast Should Contain retry
|
|
END
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Navigation
|
|
# ---------------------------------------------------------------------------
|
|
Navigation Back To Main
|
|
[Documentation] Click the back button and verify redirect to main page.
|
|
Click text=Back to Main
|
|
Wait For Elements State id=search-input visible timeout=5s
|
|
Page Title Should Contain AniWorld
|