backup
This commit is contained in:
106
tests/robot/ui/queue_page.robot
Normal file
106
tests/robot/ui/queue_page.robot
Normal file
@@ -0,0 +1,106 @@
|
||||
*** 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.
|
||||
${disabled}= Get Attribute id=start-queue-btn disabled
|
||||
IF '${disabled}' != 'true'
|
||||
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.
|
||||
${disabled}= Get Attribute id=stop-queue-btn disabled
|
||||
IF '${disabled}' != 'true'
|
||||
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.
|
||||
${disabled}= Get Attribute id=clear-completed-btn disabled
|
||||
IF '${disabled}' != 'true'
|
||||
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.
|
||||
${disabled}= Get Attribute id=clear-failed-btn disabled
|
||||
IF '${disabled}' != 'true'
|
||||
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.
|
||||
${disabled}= Get Attribute id=retry-all-btn disabled
|
||||
IF '${disabled}' != 'true'
|
||||
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
|
||||
Reference in New Issue
Block a user