backup
This commit is contained in:
112
tests/robot/ui/dashboard.robot
Normal file
112
tests/robot/ui/dashboard.robot
Normal file
@@ -0,0 +1,112 @@
|
||||
*** Settings ***
|
||||
Documentation Dashboard UI tests for Aniworld.
|
||||
... Covers search, theme toggle, rescan, series filters, select all, and download selected.
|
||||
|
||||
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 Wait For Elements State id=search-input visible timeout=5s
|
||||
|
||||
Test Teardown Close Browser
|
||||
|
||||
*** Test Cases ***
|
||||
# ---------------------------------------------------------------------------
|
||||
# Dashboard Load
|
||||
# ---------------------------------------------------------------------------
|
||||
Dashboard Loads
|
||||
[Documentation] Verify the main dashboard loads with key elements.
|
||||
Page Title Should Contain AniWorld
|
||||
Element Should Be Visible id=search-input
|
||||
Element Should Be Visible id=search-btn
|
||||
Element Should Be Visible id=rescan-btn
|
||||
Element Should Be Visible id=theme-toggle
|
||||
Element Should Be Visible id=config-btn
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Search
|
||||
# ---------------------------------------------------------------------------
|
||||
Search For Anime
|
||||
[Documentation] Type a query and submit search, verifying results appear.
|
||||
Search For Anime attack
|
||||
Element Should Be Visible id=search-results-list
|
||||
${results}= Get Element Count id=search-results-list > *
|
||||
Should Be True ${results} >= 0
|
||||
|
||||
Clear Search
|
||||
[Documentation] Click clear search and verify results are hidden.
|
||||
Search For Anime attack
|
||||
Clear Search
|
||||
Element Should Be Hidden id=search-results
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Theme Toggle
|
||||
# ---------------------------------------------------------------------------
|
||||
Theme Toggle To Dark
|
||||
[Documentation] Click theme toggle and verify dark theme is applied.
|
||||
${before}= Get Current Theme
|
||||
Should Be Equal As Strings ${before} light
|
||||
Toggle Theme
|
||||
${after}= Get Current Theme
|
||||
Should Be Equal As Strings ${after} dark
|
||||
|
||||
Theme Toggle To Light
|
||||
[Documentation] Click theme toggle twice and verify back to light.
|
||||
Toggle Theme
|
||||
Toggle Theme
|
||||
${theme}= Get Current Theme
|
||||
Should Be Equal As Strings ${theme} light
|
||||
|
||||
Theme Persists After Reload
|
||||
[Documentation] Toggle to dark, reload, and verify theme persists.
|
||||
Toggle Theme
|
||||
Reload Page
|
||||
Wait For Elements State id=search-input visible timeout=5s
|
||||
${theme}= Get Current Theme
|
||||
Should Be Equal As Strings ${theme} dark
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Rescan
|
||||
# ---------------------------------------------------------------------------
|
||||
Rescan Button
|
||||
[Documentation] Click the rescan button and verify the status indicator changes.
|
||||
Click id=rescan-btn
|
||||
Wait For Elements State #rescan-status .status-dot.scanning visible timeout=5s
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Series Filters
|
||||
# ---------------------------------------------------------------------------
|
||||
Show Missing Episodes Only
|
||||
[Documentation] Click the missing episodes filter and verify UI updates.
|
||||
Click id=show-missing-only
|
||||
${active}= Get Attribute id=show-missing-only data-active
|
||||
Should Be Equal As Strings ${active} true
|
||||
|
||||
Show All Series
|
||||
[Documentation] Click show all and verify filter is overridden.
|
||||
Click id=show-all-series
|
||||
${active}= Get Attribute id=show-all-series data-active
|
||||
Should Be Equal As Strings ${active} true
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Selection & Download
|
||||
# ---------------------------------------------------------------------------
|
||||
Select All Series
|
||||
[Documentation] Click select all and verify all series checkboxes are checked.
|
||||
Click id=select-all
|
||||
${checked}= Get Element Count .series-card input:checked
|
||||
Should Be True ${checked} >= 0
|
||||
|
||||
Download Selected
|
||||
[Documentation] Select a series and click download selected.
|
||||
# Check first series card checkbox if any exist
|
||||
${count}= Get Element Count .series-card input[type="checkbox"]
|
||||
IF ${count} > 0
|
||||
Click .series-card input[type="checkbox"] >> nth=0
|
||||
Click id=download-selected
|
||||
Toast Should Contain queue
|
||||
END
|
||||
Reference in New Issue
Block a user