fix(robot): add ${None} selector to Evaluate JavaScript calls
Browser Evaluate JavaScript keyword requires a selector element or ${None}.
Without explicit selector, single arg becomes CSS selector instead of JS code.
Fix: Evaluate JavaScript ${None} <js code>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,25 +0,0 @@
|
|||||||
## Task 10: Fix `Robot.Ui.Settings Modal.Edit NFO Settings`
|
|
||||||
|
|
||||||
**Test File:** `tests/robot/ui/settings_modal.robot`
|
|
||||||
|
|
||||||
**Error:**
|
|
||||||
```
|
|
||||||
No keyword with name 'Execute JavaScript' found.
|
|
||||||
```
|
|
||||||
|
|
||||||
**Same fix as Task 9.** Replace `Execute JavaScript` with `Evaluate JavaScript`.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Task 11: Fix `Robot.Ui.Settings Modal.Create Config Backup`
|
|
||||||
|
|
||||||
**Test File:** `tests/robot/ui/settings_modal.robot`
|
|
||||||
|
|
||||||
**Error:**
|
|
||||||
```
|
|
||||||
No keyword with name 'Execute JavaScript' found.
|
|
||||||
```
|
|
||||||
|
|
||||||
**Same fix as Task 9.** Replace `Execute JavaScript` with `Evaluate JavaScript`.
|
|
||||||
|
|
||||||
---
|
|
||||||
@@ -29,7 +29,7 @@ Anime Settings Page Loads
|
|||||||
${key}= Get JSON Value ${resp} $.key
|
${key}= Get JSON Value ${resp} $.key
|
||||||
Should Not Be Empty ${key}
|
Should Not Be Empty ${key}
|
||||||
Go To ${BASE_URL}/anime/settings?key=${key}
|
Go To ${BASE_URL}/anime/settings?key=${key}
|
||||||
Evaluate JavaScript window.AniWorld && window.AniWorld.AnimeSettingsManager && window.AniWorld.AnimeSettingsManager.init()
|
Evaluate JavaScript ${None} window.AniWorld && window.AniWorld.AnimeSettingsManager && window.AniWorld.AnimeSettingsManager.init()
|
||||||
Wait For Elements State id=settings-section visible timeout=10s
|
Wait For Elements State id=settings-section visible timeout=10s
|
||||||
Page Title Should Contain Settings
|
Page Title Should Contain Settings
|
||||||
Element Should Be Visible id=settings-section
|
Element Should Be Visible id=settings-section
|
||||||
@@ -47,7 +47,7 @@ Regenerate NFO
|
|||||||
${key}= Get JSON Value ${resp} $.key
|
${key}= Get JSON Value ${resp} $.key
|
||||||
Should Not Be Empty ${key}
|
Should Not Be Empty ${key}
|
||||||
Go To ${BASE_URL}/anime/settings?key=${key}
|
Go To ${BASE_URL}/anime/settings?key=${key}
|
||||||
Evaluate JavaScript window.AniWorld && window.AniWorld.AnimeSettingsManager && window.AniWorld.AnimeSettingsManager.init()
|
Evaluate JavaScript ${None} window.AniWorld && window.AniWorld.AnimeSettingsManager && window.AniWorld.AnimeSettingsManager.init()
|
||||||
Wait For Elements State id=settings-section visible timeout=10s
|
Wait For Elements State id=settings-section visible timeout=10s
|
||||||
Click id=regenerate-nfo-btn
|
Click id=regenerate-nfo-btn
|
||||||
Wait For Elements State css=#toast-container .toast visible timeout=5s
|
Wait For Elements State css=#toast-container .toast visible timeout=5s
|
||||||
@@ -63,7 +63,7 @@ Update Series Settings
|
|||||||
${key}= Get JSON Value ${resp} $.key
|
${key}= Get JSON Value ${resp} $.key
|
||||||
Should Not Be Empty ${key}
|
Should Not Be Empty ${key}
|
||||||
Go To ${BASE_URL}/anime/settings?key=${key}
|
Go To ${BASE_URL}/anime/settings?key=${key}
|
||||||
Evaluate JavaScript window.AniWorld && window.AniWorld.AnimeSettingsManager && window.AniWorld.AnimeSettingsManager.init()
|
Evaluate JavaScript ${None} window.AniWorld && window.AniWorld.AnimeSettingsManager && window.AniWorld.AnimeSettingsManager.init()
|
||||||
Wait For Elements State id=settings-section visible timeout=10s
|
Wait For Elements State id=settings-section visible timeout=10s
|
||||||
Fill Text id=field-folder Attack on Titan Custom
|
Fill Text id=field-folder Attack on Titan Custom
|
||||||
Click id=save-db-btn
|
Click id=save-db-btn
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ Edit Backup Settings
|
|||||||
[Documentation] Toggle backup enabled and change path/retention.
|
[Documentation] Toggle backup enabled and change path/retention.
|
||||||
Open Settings Modal
|
Open Settings Modal
|
||||||
# Backup section is below other sections - scroll to make it visible
|
# Backup section is below other sections - scroll to make it visible
|
||||||
Evaluate JavaScript document.querySelector('#config-modal .modal-body').scrollTop = 10000
|
Evaluate JavaScript ${None} document.querySelector('#config-modal .modal-body').scrollTop = 10000
|
||||||
Wait For Elements State id=backup-enabled visible timeout=5s
|
Wait For Elements State id=backup-enabled visible timeout=5s
|
||||||
Check Checkbox id=backup-enabled
|
Check Checkbox id=backup-enabled
|
||||||
Fill Text id=backup-path /tmp/aniworld_backups
|
Fill Text id=backup-path /tmp/aniworld_backups
|
||||||
@@ -109,7 +109,7 @@ Edit NFO Settings
|
|||||||
[Documentation] Enter TMDB key and toggle auto-create/media downloads.
|
[Documentation] Enter TMDB key and toggle auto-create/media downloads.
|
||||||
Open Settings Modal
|
Open Settings Modal
|
||||||
# NFO section is below other sections - scroll to make it visible
|
# NFO section is below other sections - scroll to make it visible
|
||||||
Evaluate JavaScript document.querySelector('#config-modal .modal-body').scrollTop = 10000
|
Evaluate JavaScript ${None} document.querySelector('#config-modal .modal-body').scrollTop = 10000
|
||||||
Wait For Elements State id=nfo-auto-create visible timeout=5s
|
Wait For Elements State id=nfo-auto-create visible timeout=5s
|
||||||
Fill Text id=tmdb-api-key test_tmdb_key_123
|
Fill Text id=tmdb-api-key test_tmdb_key_123
|
||||||
Check Checkbox id=nfo-auto-create
|
Check Checkbox id=nfo-auto-create
|
||||||
@@ -127,7 +127,7 @@ Create Config Backup
|
|||||||
[Documentation] Click create backup and verify success notification.
|
[Documentation] Click create backup and verify success notification.
|
||||||
Open Settings Modal
|
Open Settings Modal
|
||||||
# Scroll to bottom to make the create-config-backup button visible
|
# Scroll to bottom to make the create-config-backup button visible
|
||||||
Evaluate JavaScript document.querySelector('#config-modal .modal-body').scrollTop = 10000
|
Evaluate JavaScript ${None} document.querySelector('#config-modal .modal-body').scrollTop = 10000
|
||||||
Wait For Elements State id=create-config-backup visible timeout=5s
|
Wait For Elements State id=create-config-backup visible timeout=5s
|
||||||
Click id=create-config-backup
|
Click id=create-config-backup
|
||||||
# Backup creation shows toast (stub implementation - no actual file created)
|
# Backup creation shows toast (stub implementation - no actual file created)
|
||||||
|
|||||||
Reference in New Issue
Block a user