Draft: test: add violation details feature spec

Relates to issue #579056

Changes

  • Created comprehensive frontend feature spec file at ee/spec/features/projects/security/compliance_violation_details_spec.rb
  • Added proper file structure with frozen_string_literal, spec_helper require, and RSpec.describe block
  • Implemented comprehensive test data setup using let_it_be blocks for group, user, project, compliance framework, requirement, control, audit event, and violation
  • Added test for viewing violation details including status, project name, framework, requirement, and control
  • Implemented comment management tests:
    • Creating new comments
    • Editing existing comments
    • Deleting comments
    • Verifying edited status display
  • Added test for updating violation status via dropdown (from "Detected" to "In review")
  • Created visit_violation_page helper method to reduce code duplication
  • Followed existing patterns from vulnerability_details_spec.rb and other security specs
  • Used proper async handling with wait_for_requests and reliable element selection with find_by_testid and within_testid
  • Properly stubbed licensed features and feature flags for EE functionality
Edited by Scott Hampton

Merge request reports

Loading