←
TRCKR-436
Created: 2025-12-18
•
Updated: 2025-12-18
Relationships
Loading...
Attachments
Loading...
Comments (3)
qa-agent
·
2025-12-18
## QA PASSED
See QA report document: 5f228fdc-b286-4d77-b240-644ed76c7cc1
All 25 project form Playwright tests pass consistently:
- Status dropdown count: PASS (scoped to visible dropdown)
- Create option selectors: PASS (using .create-option class)
- Keyboard shortcuts: PASS (unfocusing name input before shortcuts)
No regressions found in E2E tests (14 passed) or settings web tests (4 passed).
Fix verified working.
agent
·
2025-12-18
## Fix Summary
Fixed all 10 failing project form Playwright tests by improving test selectors and handling auto-focus.
### Root Causes Identified
1. **Status dropdown count test** - The selector `.property-dropdown-option` matched options from ALL pre-rendered dropdown menus in the DOM, not just the visible one
2. **Create option tests** - `get_by_text('Create')` matched both the 'Create Project' submit button AND the dropdown 'Create "x"' options
3. **Keyboard shortcut tests** - The name input is auto-focused on modal open (project_form.html:258-262), so keyboard shortcuts were blocked when pressing s/o/m/t/d
### Changes Made
**tests/__init__.py** - Added missing package marker file to fix module import issues
**tests/test_project_form_web.py**:
1. **Line 47**: Scoped status option count to visible dropdown using `.property-dropdown-menu:visible`
2. **Lines 126, 141, 174, 332**: Changed `get_by_text('Create')` to `.create-option` class selector
3. **Lines 366, 382, 396, 410, 424**: Changed `.modal-body.click()` to `get_by_test_id('project-modal-title').click()` to properly unfocus the auto-focused name input
### Test Results
All 25 tests now pass:
```
tests/test_project_form_web.py: 25 passed in 50.47s
```
### Notes
- No template changes were needed - only test file fixes
- The `.create-option` class already exists in the dropdown implementation (base.html:5210)
triage-agent
·
2025-12-18
## Bug Triage Complete
**Reproduction:** CONFIRMED (10 tests failing, not 9 as originally reported)
**Summary:** The test failures are caused by:
1. **Status option count test** - Selector matches all dropdown options in DOM, not just visible ones
2. **Create option tests (4 failures)** - `get_by_text('Create')` matches both submit button and dropdown option
3. **Keyboard shortcut tests (5 failures)** - Input auto-focus prevents shortcuts from triggering
**Root Cause:** Test selectors are too broad and don't account for:
- Multiple pre-rendered dropdown menus in DOM
- The 'Create Project' button text conflicting with 'Create' dropdown options
- Auto-focused name input blocking keyboard shortcuts
**TDD Approach:**
1. Use `.property-dropdown-menu:visible .property-dropdown-option` for scoped option counting
2. Use `.create-option` class instead of text matching for create options
3. Click modal header before testing keyboard shortcuts to unfocus input
**No template changes needed** - only test file fixes required.
See attached triage report for full details and code examples.