fix(login): align HTML element IDs with Robot Framework selectors

- Rename password input id from 'password' to 'password-input'
- Rename login button id from 'login-button' to 'login-submit-btn'
- Update JS references to match new IDs
- Remove completed Task 15 from Docs/tasks.md
This commit is contained in:
2026-06-26 19:54:10 +02:00
parent 1f3eddf554
commit df0d54cc34
2 changed files with 4 additions and 12 deletions

View File

@@ -1,11 +1,3 @@
### Task 15: Fix `Connect To WebSocket` API Test
**Test Result:** FAIL — `Evaluate` keyword syntax error / requires custom keyword library
**File:** `tests/robot/api/websocket.robot`
**Instructions:**
The test tries to evaluate `__import__('asyncio').run(__import__('websockets').connect(...))` inline, which is unreliable in Robot Framework. Create a small Python keyword library (e.g., `tests/robot/resources/websocket_keywords.py`) that wraps WebSocket connection logic using the `websockets` library. Import this library in `websocket.robot` and replace the inline `Evaluate` with a proper keyword like `Connect To WebSocket`. Ensure the library handles token-based authentication.
---
### Task 16: Fix `Login Page Loads` UI Test ### Task 16: Fix `Login Page Loads` UI Test
**Test Result:** FAIL — `TimeoutError: locator.waitFor: Timeout 5000ms exceeded. Call log: waiting for locator('id=password-input') to be visible` **Test Result:** FAIL — `TimeoutError: locator.waitFor: Timeout 5000ms exceeded. Call log: waiting for locator('id=password-input') to be visible`
**File:** `tests/robot/ui/login.robot` and `src/server/web/templates/login.html` **File:** `tests/robot/ui/login.robot` and `src/server/web/templates/login.html`

View File

@@ -229,7 +229,7 @@
<div class="password-input-group"> <div class="password-input-group">
<input <input
type="password" type="password"
id="password" id="password-input"
name="password" name="password"
class="password-input" class="password-input"
placeholder="Enter your password" placeholder="Enter your password"
@@ -244,7 +244,7 @@
<div id="message-container"></div> <div id="message-container"></div>
<button type="submit" class="login-button" id="login-button"> <button type="submit" class="login-button" id="login-submit-btn">
<i class="fas fa-sign-in-alt"></i> <i class="fas fa-sign-in-alt"></i>
<span>Login</span> <span>Login</span>
</button> </button>
@@ -285,7 +285,7 @@
// Password visibility toggle // Password visibility toggle
const passwordToggle = document.getElementById('password-toggle'); const passwordToggle = document.getElementById('password-toggle');
const passwordInput = document.getElementById('password'); const passwordInput = document.getElementById('password-input');
passwordToggle.addEventListener('click', () => { passwordToggle.addEventListener('click', () => {
const type = passwordInput.getAttribute('type'); const type = passwordInput.getAttribute('type');
@@ -298,7 +298,7 @@
// Form submission // Form submission
const loginForm = document.getElementById('login-form'); const loginForm = document.getElementById('login-form');
const loginButton = document.getElementById('login-button'); const loginButton = document.getElementById('login-submit-btn');
const messageContainer = document.getElementById('message-container'); const messageContainer = document.getElementById('message-container');
loginForm.addEventListener('submit', async (e) => { loginForm.addEventListener('submit', async (e) => {