STD: Keyboard Shortcuts (KEYBOARD)
Version: v1.0.0 Status: Draft SRS Source:
docusaurus/docs/srs/keyboard.mdDomain: KEYBOARD
Overview
This document specifies tests for the Keyboard Shortcuts domain, which covers keyboard-based triggers for common operations, modal/widget dismissal, and input conflict prevention.
Domain Characteristics:
- Primary function: User input handling (keyboard events)
- Secondary function: Modal/widget state management
- Implementation: Frontend-only (Vue.js with v-hotkey directive)
Test Method Rationale:
Per Test Plan Section 3.3, UI Features domains use TM-UI as primary method. Keyboard shortcuts require browser-based verification since they depend on key event handling, focus management, and modal state. TM-MAN is used for visual verification of tooltips and discoverability indicators.
Test Case Convention:
Steps describe logical actions, not UI mechanics. Use "Press the export shortcut key" or "Verify tooltip displays shortcut", not "Press the x key" or "Check title attribute of button". This ensures test intent survives shortcut key reassignment.
Coverage Summary
| REQ ID | Title | ACs | Tests | AC Coverage | Method | Gaps |
|---|---|---|---|---|---|---|
| REQ-KEYBOARD-001 | Execute Actions via Keyboard Shortcuts | 10 | TC-KEYBOARD-001 through TC-KEYBOARD-006 | 10/10 (100%) | TM-UI, TM-MAN | None |
| REQ-KEYBOARD-002 | Dismiss Active Modal or Widget | 4 | TC-KEYBOARD-007, TC-KEYBOARD-008 | 4/4 (100%) | TM-UI | None |
Totals: 2 REQs, 14 ACs, 8 Test Cases, 100% Coverage
Test Cases
TC-KEYBOARD-001: Global shortcuts execute on all screens
Verifies: REQ-KEYBOARD-001 (AC1, AC2, AC5)
Method: TM-UI
Priority: High
Preconditions:
- User logged in with at least Junior User role
- User has navigated through at least 3 different screens (Run Files, Run Report, Settings)
Steps:
- Navigate to Run Files page
- Press the export shortcut key (where export is available)
- Verify export operation triggers
- Navigate to Run Report page
- Press the print shortcut key
- Verify print operation triggers
- Navigate to Settings page (or any screen with print available)
- Press the print shortcut key
- Verify print operation triggers
Expected Results:
- AC1: System accepts keyboard input and triggers bound actions
- AC2: Global shortcuts (export, print) function on all screens where the action exists
- AC5: Global shortcuts for export/download and print operations are available
Automation Status: Automated
Jira: BT-2482
TC-KEYBOARD-002: Context-specific shortcuts execute only where action exists
Verifies: REQ-KEYBOARD-001 (AC3, AC6)
Method: TM-UI
Priority: High
Preconditions:
- User logged in with appropriate permissions
- Run Report page is accessible with a runfile loaded
Test Data:
- Runfile with at least one well for testing edit/reanalyze actions
Steps:
- Navigate to Run Report page (has Edit, Manage Results, ReAnalyse, Run Information)
- Press edit shortcut key
- Verify edit action triggers
- Press manage results shortcut key
- Verify manage results action triggers
- Press reanalyze shortcut key
- Verify reanalyze action triggers
- Press run information shortcut key
- Verify run information panel opens
- Navigate to a page without Edit functionality (e.g., Dashboard)
- Press edit shortcut key
- Verify no action occurs (key ignored)
Expected Results:
- AC3: Context-specific shortcuts function only where corresponding action is available
- AC6: Context-specific shortcuts for edit, manage results, reanalyze, and run information operations are available
Automation Status: Automated
Jira: BT-2482
TC-KEYBOARD-003: Shortcut discoverability via tooltips
Verifies: REQ-KEYBOARD-001 (AC4)
Method: TM-MAN
Priority: Medium
Preconditions:
- User on a page with toolbar icons that have keyboard shortcuts
Steps:
- Navigate to Run Report page
- Hover over Export icon
- Observe tooltip content
- Hover over Print icon
- Observe tooltip content
- Hover over Edit icon
- Observe tooltip content
Expected Results:
- AC4: Each icon displays tooltip showing the associated shortcut key
- Tooltip indicates shortcut key (e.g., "Export (x)")
- Visual indicator (hover background change) shows shortcut availability
Automation Status: Manual (visual verification of tooltip content)
Jira: BT-2482
TC-KEYBOARD-004: Shortcuts disabled during text input focus
Verifies: REQ-KEYBOARD-001 (AC7, AC8)
Method: TM-UI
Priority: Critical
Preconditions:
- User on a page with both a text input field and available shortcuts
Test Data:
- Page with search/filter text input and export shortcut available
Steps:
- Navigate to a page with text input and shortcuts
- Click into text input field to focus
- Type the export shortcut key character
- Observe text input and export behavior
- Type the print shortcut key character
- Observe text input and print behavior
Expected Results:
- AC7: Shortcut keys are entered as text in the input field
- AC7: Export and print shortcuts do NOT trigger while text input has focus
- AC8: If modifier key required (Ctrl+key), verify that works while in text field
Automation Status: Automated
Jira: BT-2491
TC-KEYBOARD-005: Single modal/widget active constraint
Verifies: REQ-KEYBOARD-001 (AC9)
Method: TM-UI
Priority: High
Preconditions:
- User on Run Report page
- At least one shortcut opens a modal or widget (e.g., Run Information)
Steps:
- Navigate to Run Report page
- Press run information shortcut key to open panel
- Verify panel opens
- Press manage results shortcut key (attempts to open another widget)
- Observe modal/widget state
Expected Results:
- AC9: Only one modal or widget is active at a time
- First widget remains open
- Second widget does NOT open
- (Exception: Dismiss shortcut can close active modal)
Automation Status: Automated
Jira: BT-2491
TC-KEYBOARD-006: Single action per key press (no repeat)
Verifies: REQ-KEYBOARD-001 (AC10)
Method: TM-UI
Priority: High
Preconditions:
- User on a page with countable shortcut action (e.g., page with export that can be observed)
Steps:
- Navigate to Run Report page
- Press and hold the export shortcut key for 3 seconds
- Release the key
- Count number of export actions triggered
Expected Results:
- AC10: Export action is performed exactly once
- No repeated triggering while key is held down
- Action activates on first key press, not on key release
Automation Status: Automated
Jira: BT-2490
TC-KEYBOARD-007: Dismiss shortcut closes modals and widgets
Verifies: REQ-KEYBOARD-002 (AC1, AC2, AC3)
Method: TM-UI
Priority: High
Preconditions:
- User on a page where modals/widgets can be opened
Test Data:
- Multiple modal types: Run Information panel, Export options dialog, Confirmation dialog
Steps:
- Open Run Information panel
- Press dismiss shortcut key
- Verify panel closes
- Open Export options dialog
- Press dismiss shortcut key
- Verify dialog closes
- Trigger a confirmation modal
- Press dismiss shortcut key
- Verify modal closes
Expected Results:
- AC1: Dismiss shortcut closes any modal with close control
- AC2: Dismiss works regardless of modal content type
- AC3: Dismiss applies to both modals and widgets that have close control (X button)
Automation Status: Automated
Jira: [Pending]
TC-KEYBOARD-008: Focus returns to underlying screen after dismiss
Verifies: REQ-KEYBOARD-002 (AC4)
Method: TM-UI
Priority: Medium
Preconditions:
- User has interacted with a focusable element before opening modal
Steps:
- Navigate to Run Report page
- Tab to or click a specific element (e.g., a row in the wells table)
- Note the focused element
- Open Run Information panel
- Interact with panel content (optional)
- Press dismiss shortcut key
- Observe focus location
Expected Results:
- AC4: Focus returns to the underlying screen after dismissal
- User can continue keyboard navigation from appropriate position
Automation Status: Automated
Jira: [Pending]
Gap Analysis
No gaps identified. All 14 acceptance criteria have test coverage.
Coverage by AC Type
| AC Category | Count | Covered | Notes |
|---|---|---|---|
| Shortcut Availability | 4 | 4 | TC-001, TC-002, TC-003 |
| Shortcut Categories | 2 | 2 | TC-001, TC-002 |
| Input Conflict Prevention | 2 | 2 | TC-004 |
| Execution Constraints | 2 | 2 | TC-005, TC-006 |
| Dismiss Behavior | 3 | 3 | TC-007 |
| Focus Management | 1 | 1 | TC-008 |
Traceability to Existing Tests
| Test Case | Jira Test | Automation |
|---|---|---|
| TC-KEYBOARD-001, TC-KEYBOARD-002, TC-KEYBOARD-003 | BT-2482 | Selenium/Manual |
| TC-KEYBOARD-004, TC-KEYBOARD-005 | BT-2491 | Selenium |
| TC-KEYBOARD-006 | BT-2490 | Selenium |
| TC-KEYBOARD-007, TC-KEYBOARD-008 | Pending | Automated |
Notes
- KEYBOARD is a frontend-only domain; all tests require browser automation or manual execution
- Shortcut key values (x, p, e, m, r, i, Esc) are configurable; tests should reference actions, not specific keys
- TC-KEYBOARD-003 is manual due to visual verification of tooltip content and hover states
- REQ-KEYBOARD-002 tests are marked "Planned" as no Jira test exists yet