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:
@@ -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
|
||||
**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`
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
<div class="password-input-group">
|
||||
<input
|
||||
type="password"
|
||||
id="password"
|
||||
id="password-input"
|
||||
name="password"
|
||||
class="password-input"
|
||||
placeholder="Enter your password"
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
<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>
|
||||
<span>Login</span>
|
||||
</button>
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
// Password visibility toggle
|
||||
const passwordToggle = document.getElementById('password-toggle');
|
||||
const passwordInput = document.getElementById('password');
|
||||
const passwordInput = document.getElementById('password-input');
|
||||
|
||||
passwordToggle.addEventListener('click', () => {
|
||||
const type = passwordInput.getAttribute('type');
|
||||
@@ -298,7 +298,7 @@
|
||||
|
||||
// Form submission
|
||||
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');
|
||||
|
||||
loginForm.addEventListener('submit', async (e) => {
|
||||
|
||||
Reference in New Issue
Block a user