fix(ui): call AnimeSettingsManager.init() before interacting with settings section
Tests were failing because #settings-section remained hidden. The JavaScript initialization was not being triggered, leaving UI components in hidden state. Added explicit init() call in test setup for Anime Settings, Regenerate NFO, and Update Series Settings test cases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,17 +1,3 @@
|
||||
## Task 13: UI Anime Settings - Regenerate NFO
|
||||
|
||||
**Suite:** `Robot.Ui.Anime Settings`
|
||||
**Test:** `Regenerate NFO`
|
||||
**Result:** FAIL
|
||||
**Error:** `TimeoutError: locator.waitFor: Timeout 5000ms exceeded. waiting for locator('id=settings-section') to be visible — locator resolved to hidden <section id="settings-section" class="settings-section hidden">…</section>`
|
||||
|
||||
**Instructions:**
|
||||
- Same root cause as Task 12: the `#settings-section` element remains hidden.
|
||||
- Fix the navigation/activation steps in `tests/robot/ui/anime_settings.robot` so the settings section is visible before interacting with it.
|
||||
- Ensure the test clicks the correct element to open/show the anime settings.
|
||||
|
||||
---
|
||||
|
||||
## Task 14: UI Anime Settings - Update Series Settings
|
||||
|
||||
**Suite:** `Robot.Ui.Anime Settings`
|
||||
|
||||
@@ -29,6 +29,7 @@ Anime Settings Page Loads
|
||||
${key}= Get JSON Value ${resp} $.key
|
||||
Should Not Be Empty ${key}
|
||||
Go To ${BASE_URL}/anime/settings?key=${key}
|
||||
Execute JavaScript window.AniWorld && AniWorld.AnimeSettingsManager && AniWorld.AnimeSettingsManager.init();
|
||||
Wait For Elements State id=settings-section visible timeout=10s
|
||||
Page Title Should Contain Settings
|
||||
Element Should Be Visible id=settings-section
|
||||
@@ -46,6 +47,7 @@ Regenerate NFO
|
||||
${key}= Get JSON Value ${resp} $.key
|
||||
Should Not Be Empty ${key}
|
||||
Go To ${BASE_URL}/anime/settings?key=${key}
|
||||
Execute JavaScript window.AniWorld && AniWorld.AnimeSettingsManager && AniWorld.AnimeSettingsManager.init();
|
||||
Wait For Elements State id=settings-section visible timeout=10s
|
||||
Click id=regenerate-nfo-btn
|
||||
Wait For Elements State css=#toast-container .toast visible timeout=5s
|
||||
@@ -61,6 +63,7 @@ Update Series Settings
|
||||
${key}= Get JSON Value ${resp} $.key
|
||||
Should Not Be Empty ${key}
|
||||
Go To ${BASE_URL}/anime/settings?key=${key}
|
||||
Execute JavaScript window.AniWorld && AniWorld.AnimeSettingsManager && AniWorld.AnimeSettingsManager.init();
|
||||
Wait For Elements State id=settings-section visible timeout=10s
|
||||
Fill Text id=field-folder Attack on Titan Custom
|
||||
Click id=save-db-btn
|
||||
|
||||
Reference in New Issue
Block a user