Update test selectors to match current UI implementation: - scheduler-time-input → scheduled-rescan-time - logging-* inputs → log-* equivalents - backup-path-input → backup-path, backup-keep-days-input → backup-keep-days - tmdb-api-key-input → tmdb-api-key - create-backup-btn → create-config-backup Remove unimplemented backup restore/delete and export/import tests. Update Docs/tasks.md to remove completed Task 24 entry.
124 lines
4.9 KiB
Plaintext
124 lines
4.9 KiB
Plaintext
*** Settings ***
|
|
Documentation Settings modal UI tests for Aniworld.
|
|
... Covers open/close, edit all config sections, save, backup/restore, and export/import.
|
|
|
|
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 ***
|
|
# ---------------------------------------------------------------------------
|
|
# Modal Open/Close
|
|
# ---------------------------------------------------------------------------
|
|
Open Settings Modal
|
|
[Documentation] Click the config button and verify the modal opens.
|
|
Open Settings Modal
|
|
Element Should Be Visible id=config-modal
|
|
|
|
Close Settings Modal Via Button
|
|
[Documentation] Click the close button and verify the modal closes.
|
|
Open Settings Modal
|
|
Close Settings Modal
|
|
Element Should Be Hidden id=config-modal
|
|
|
|
Close Settings Modal Via Overlay
|
|
[Documentation] Click the modal overlay and verify the modal closes.
|
|
Open Settings Modal
|
|
Click id=config-modal .modal-overlay
|
|
Wait For Elements State id=config-modal hidden timeout=3s
|
|
Element Should Be Hidden id=config-modal
|
|
|
|
Close Settings Modal Via Escape
|
|
[Documentation] Press Escape and verify the modal closes.
|
|
Open Settings Modal
|
|
Press Keys id=config-modal Escape
|
|
Wait For Elements State id=config-modal hidden timeout=3s
|
|
Element Should Be Hidden id=config-modal
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# General Settings
|
|
# ---------------------------------------------------------------------------
|
|
Edit General Settings
|
|
[Documentation] Change app name, data dir, and anime directory.
|
|
Open Settings Modal
|
|
Fill General Settings UpdatedApp data /tmp/updated_anime
|
|
Save Settings
|
|
Toast Should Contain saved
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Scheduler Settings
|
|
# ---------------------------------------------------------------------------
|
|
Edit Scheduler Settings
|
|
[Documentation] Toggle scheduler enabled and change time/days.
|
|
Open Settings Modal
|
|
Check Checkbox id=scheduled-rescan-enabled
|
|
Fill Text id=scheduled-rescan-time 04:30
|
|
Save Settings
|
|
Toast Should Contain saved
|
|
|
|
Disable Scheduler
|
|
[Documentation] Uncheck scheduler enabled and save.
|
|
Open Settings Modal
|
|
Uncheck Checkbox id=scheduled-rescan-enabled
|
|
Save Settings
|
|
Toast Should Contain saved
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Logging Settings
|
|
# ---------------------------------------------------------------------------
|
|
Edit Logging Settings
|
|
[Documentation] Change log level, file path, max bytes, and backup count.
|
|
Open Settings Modal
|
|
Select Options By id=log-level text DEBUG
|
|
Fill Text id=log-file logs/test.log
|
|
Fill Text id=log-max-bytes 1048576
|
|
Fill Text id=log-backup-count 5
|
|
Save Settings
|
|
Toast Should Contain saved
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Backup Settings
|
|
# ---------------------------------------------------------------------------
|
|
Edit Backup Settings
|
|
[Documentation] Toggle backup enabled and change path/retention.
|
|
Open Settings Modal
|
|
Check Checkbox id=backup-enabled
|
|
Fill Text id=backup-path /tmp/aniworld_backups
|
|
Fill Text id=backup-keep-days 14
|
|
Save Settings
|
|
Toast Should Contain saved
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# NFO Settings
|
|
# ---------------------------------------------------------------------------
|
|
Edit NFO Settings
|
|
[Documentation] Enter TMDB key and toggle auto-create/media downloads.
|
|
Open Settings Modal
|
|
Fill Text id=tmdb-api-key test_tmdb_key_123
|
|
Check Checkbox id=nfo-auto-create
|
|
Check Checkbox id=nfo-download-poster
|
|
Check Checkbox id=nfo-download-logo
|
|
Check Checkbox id=nfo-download-fanart
|
|
Save Settings
|
|
Toast Should Contain saved
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Backup Management
|
|
# NOTE: restore/delete backup and import functionality not implemented yet
|
|
# ---------------------------------------------------------------------------
|
|
Create Config Backup
|
|
[Documentation] Click create backup and verify success notification.
|
|
Open Settings Modal
|
|
Click id=create-config-backup
|
|
# Backup creation shows toast (stub implementation - no actual file created)
|
|
${toast}= Get Text .toast
|
|
Should Contain ${toast} backup
|