Files
Aniworld/Docs/tasks.md

13 KiB

Task 9: API Scheduler - Empty Schedule Days

Suite: Robot.Api.Scheduler
Test: Empty Schedule Days
Result: FAIL
Error: Url: http://127.0.0.1:8765/api/scheduler/config Expected status: 422 != 200

Instructions:

  • Investigate the PUT /api/scheduler/config endpoint when schedule_days is an empty list/array.
  • The test expects the backend to accept empty schedule days (HTTP 200), but it returns 422.
  • Check the Pydantic validator for schedule_days — it may require at least one day.
  • Decide whether empty schedule days should be allowed (update backend) or rejected (update test to expect 422).

Task 10: API Setup - Resolve Folder With Provider Key

Suite: Robot.Api.Setup
Test: Resolve Folder With Provider Key
Result: FAIL
Error: Url: http://127.0.0.1:8765/api/setup/unresolved/Unknown%20Anime%20(2020)/resolve Expected status: 400 != 200

Instructions:

  • Investigate the POST /api/setup/unresolved/{folder_name}/resolve endpoint.
  • The test tries to resolve Unknown Anime (2020) but gets 400.
  • Check if the folder exists in the unresolved folders list or if the provider key is missing/invalid.
  • Verify the request payload in tests/robot/api/setup.robot includes a valid provider_key.
  • Fix the test data or the backend validation logic.

Task 11: API Websocket - Connect To WebSocket

Suite: Robot.Api.Websocket
Test: Connect To WebSocket
Result: FAIL
Error: No keyword with name 'Connect To WebSocket' found.

Instructions:

  • The custom keyword library tests/robot/resources/websocket_keywords.py contains no keywords (warning was shown).
  • Open tests/robot/resources/websocket_keywords.py and implement the Connect To WebSocket keyword.
  • The keyword should establish a WebSocket connection to the server (e.g., ws://127.0.0.1:8765/ws).
  • Use a Python WebSocket client library (e.g., websocket-client) inside the keyword.
  • Ensure the library is properly exported so Robot Framework can discover it.

Task 12: UI Anime Settings - Anime Settings Page Loads

Suite: Robot.Ui.Anime Settings
Test: Anime Settings Page Loads
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:

  • The #settings-section element has the CSS class hidden, preventing it from becoming visible.
  • Investigate the anime settings page frontend code to understand how the settings section is shown/hidden.
  • The test may need to click a button or navigate differently to reveal the section.
  • Update the test in tests/robot/ui/anime_settings.robot to perform the correct navigation steps before waiting for #settings-section.
  • Alternatively, if the section should be visible by default, fix the frontend logic.

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
Test: Update Series Settings
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 and 13: 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 15: UI Dashboard - Download Selected

Suite: Robot.Ui.Dashboard
Test: Download Selected
Result: FAIL
Error: 'Mit Server verbunden' does not contain 'queue'

Instructions:

  • The test expects a toast/notification message containing the word queue after clicking "Download Selected".
  • Instead, the German message Mit Server verbunden (Connected to server) appears.
  • Check the dashboard frontend code for the download action toast message.
  • Either update the frontend to show an English message containing queue, or update the test in tests/robot/ui/dashboard.robot to match the actual German text.
  • Consider using a data-testid or a more stable assertion instead of toast text.

Task 16: UI Login - Login Rate Limit UI

Suite: Robot.Ui.Login
Test: Login Rate Limit UI
Result: FAIL
Error: 'invalid credentials' does not contain 'lockout'

Instructions:

  • The test expects a lockout message containing lockout after multiple failed login attempts.
  • Instead, the message invalid credentials is shown.
  • Investigate the login rate-limiting logic in the backend and frontend.
  • Check if rate limiting is actually triggered (may require more attempts or a different timing).
  • Update the test in tests/robot/ui/login.robot to match the actual error message, or fix the rate-limiting display in the frontend.

Task 17: UI Settings Modal - Close Settings Modal Via Overlay

Suite: Robot.Ui.Settings Modal
Test: Close Settings Modal Via Overlay
Result: FAIL
Error: TimeoutError: locator.click: Timeout 10000ms exceeded. waiting for locator('id=config-modal .modal-overlay')

Instructions:

  • The test tries to click a .modal-overlay element inside #config-modal, but the element is not found.
  • Inspect the settings modal HTML structure in the frontend.
  • The overlay element may have a different class name (e.g., .modal-backdrop, .overlay) or may not exist as a separate element.
  • Update the locator in tests/robot/ui/settings_modal.robot to match the actual DOM structure.
  • If the overlay click-to-close behavior is missing, implement it in the frontend.

Task 18: UI Settings Modal - Close Settings Modal Via Escape

Suite: Robot.Ui.Settings Modal
Test: Close Settings Modal Via Escape
Result: FAIL
Error: TimeoutError: locator.waitFor: Timeout 3000ms exceeded. waiting for locator('id=config-modal') to be hidden — locator resolved to visible <div class="modal" id="config-modal">…</div>

Instructions:

  • The test presses the Escape key to close the settings modal, but the modal remains visible.
  • Investigate the modal JavaScript/frontend code to see if Escape key handling is implemented.
  • If Escape-to-close is missing, add an event listener in the frontend that closes #config-modal on keydown with key === 'Escape'.
  • If the behavior exists but is broken, debug why the modal is not closing.
  • Alternatively, update the test to use a different close method if Escape is not supported.

Task 19: UI Settings Modal - Disable Scheduler

Suite: Robot.Ui.Settings Modal
Test: Disable Scheduler
Result: FAIL
Error: TimeoutError: locator.uncheck: Timeout 10000ms exceeded. waiting for locator('id=scheduled-rescan-enabled') — element is not visible

Instructions:

  • The test tries to uncheck #scheduled-rescan-enabled, but the checkbox is not visible.
  • The checkbox may be inside a collapsed tab, hidden panel, or require scrolling.
  • Investigate the settings modal layout — the scheduler settings may be on a different tab or section.
  • Update the test in tests/robot/ui/settings_modal.robot to navigate to the correct tab/section before interacting with the checkbox.
  • Alternatively, ensure the checkbox is visible when the modal opens.

Task 20: UI Settings Modal - Edit Backup Settings

Suite: Robot.Ui.Settings Modal
Test: Edit Backup Settings
Result: FAIL
Error: TimeoutError: locator.check: Timeout 10000ms exceeded. waiting for locator('id=backup-enabled') — element is not visible

Instructions:

  • The test tries to check #backup-enabled, but the checkbox is not visible.
  • Same root cause as Task 19: the backup settings may be inside a collapsed tab or hidden panel.
  • Update the test in tests/robot/ui/settings_modal.robot to navigate to the correct tab/section before interacting with the checkbox.
  • Ensure the backup settings section is visible when the modal opens or after clicking the appropriate tab.

Task 21: UI Settings Modal - Edit NFO Settings

Suite: Robot.Ui.Settings Modal
Test: Edit NFO Settings
Result: FAIL
Error: TimeoutError: locator.check: Timeout 10000ms exceeded. waiting for locator('id=nfo-auto-create') — element is not visible

Instructions:

  • The NFO settings fields suffer from visibility issues similar to Tasks 19 and 20.
  • Verify the test in tests/robot/ui/settings_modal.robot correctly navigates to the NFO settings tab/section.
  • Ensure all form elements are visible before interacting with them.
  • Update locators if the element IDs or structure changed.

Task 22: UI Setup Flow - Setup Page Loads

Suite: Robot.Ui.Setup Flow
Test: Setup Page Loads
Result: FAIL
Error: TimeoutError: locator.waitFor: Timeout 5000ms exceeded. waiting for locator('id=setup-form') to be visible

Instructions:

  • The setup flow tests expect #setup-form to be visible, but it is not found.
  • Investigate the setup page frontend code.
  • The app may already be configured, causing the setup page to redirect to the dashboard instead of showing the form.
  • Check if a suite-level setup/teardown resets the app to an unconfigured state before running setup flow tests.
  • Update the test setup in tests/robot/ui/setup_flow.robot or the backend to ensure the setup form is available.

Task 23: UI Setup Flow - Password Strength Weak

Suite: Robot.Ui.Setup Flow
Test: Password Strength Weak
Result: FAIL
Error: TimeoutError: locator.waitFor: Timeout 5000ms exceeded. waiting for locator('id=setup-form') to be visible

Instructions:

  • Same root cause as Task 22: the setup form is not visible.
  • Fix the suite setup so the app is in an unconfigured state before each setup flow test.
  • Ensure #setup-form is rendered when navigating to the setup page.

Task 24: UI Setup Flow - Password Strength Medium

Suite: Robot.Ui.Setup Flow
Test: Password Strength Medium
Result: FAIL
Error: TimeoutError: locator.waitFor: Timeout 5000ms exceeded. waiting for locator('id=setup-form') to be visible

Instructions:

  • Same root cause as Task 22: the setup form is not visible.
  • Fix the suite setup so the app is in an unconfigured state before each setup flow test.
  • Ensure #setup-form is rendered when navigating to the setup page.

Task 25: UI Setup Flow - Password Strength Strong

Suite: Robot.Ui.Setup Flow
Test: Password Strength Strong
Result: FAIL
Error: TimeoutError: locator.waitFor: Timeout 5000ms exceeded. waiting for locator('id=setup-form') to be visible

Instructions:

  • Same root cause as Task 22: the setup form is not visible.
  • Fix the suite setup so the app is in an unconfigured state before each setup flow test.
  • Ensure #setup-form is rendered when navigating to the setup page.

Task 26: UI Setup Flow - Setup Form Validation Empty Password

Suite: Robot.Ui.Setup Flow
Test: Setup Form Validation Empty Password
Result: FAIL
Error: TimeoutError: locator.waitFor: Timeout 5000ms exceeded. waiting for locator('id=setup-form') to be visible

Instructions:

  • Same root cause as Task 22: the setup form is not visible.
  • Fix the suite setup so the app is in an unconfigured state before each setup flow test.
  • Ensure #setup-form is rendered when navigating to the setup page.

Task 27: UI Setup Flow - Setup Form Validation Mismatched Passwords

Suite: Robot.Ui.Setup Flow
Test: Setup Form Validation Mismatched Passwords
Result: FAIL
Error: TimeoutError: locator.waitFor: Timeout 5000ms exceeded. waiting for locator('id=setup-form') to be visible

Instructions:

  • Same root cause as Task 22: the setup form is not visible.
  • Fix the suite setup so the app is in an unconfigured state before each setup flow test.
  • Ensure #setup-form is rendered when navigating to the setup page.

Task 28: UI Setup Flow - Complete Setup Flow

Suite: Robot.Ui.Setup Flow
Test: Complete Setup Flow
Result: FAIL
Error: TimeoutError: locator.waitFor: Timeout 5000ms exceeded. waiting for locator('id=setup-form') to be visible

Instructions:

  • Same root cause as Task 22: the setup form is not visible.
  • Fix the suite setup so the app is in an unconfigured state before each setup flow test.
  • Ensure #setup-form is rendered when navigating to the setup page.