Draft: test: add feature spec for violation details
Relates to issue #579056
Changes
This MR adds a comprehensive frontend feature spec file for the Compliance Violation Details page at ee/spec/features/projects/security/compliance_violation_details_spec.rb.
Test Coverage Includes:
File Structure & Setup
- RSpec configuration with
:jstag andfeature_category: :compliance_management - Complete test data setup using factories (group, user, project, framework, requirement, control, audit_event, violation)
- Proper user permissions and licensed feature stubbing
Page Navigation and Display
- Violation information display
- Violation title with proper format
- Project link display
- Audit event information
Status Management
- Changing violation status via dropdown with toast message verification
Comment Functionality
- Creating new comments
- Editing existing comments
- Displaying edited status on comments
- Deleting comments with modal confirmation
- Replying to comments
Comment Features
- Adding emoji reactions to comments
Related Sections
- Displaying related issues section
- Displaying activity section when comments exist
Feature Flag Behavior
- Testing feature flag disabled state
Implementation Details:
- 15 comprehensive test cases covering all major functionality
- Follows GitLab testing patterns based on existing specs like
vulnerability_details_spec.rb - Uses proper test helpers:
wait_for_requests,within_testid,find_by_testid,sign_in,stub_licensed_features,stub_feature_flags - Correct factory usage with proper associations
- Uses correct testid selectors from Vue components
Edited by Scott Hampton