Add target_type to refine the query in spec

What does this MR do and why?

The AuditEvent is being queried only by the target_id and it is possible that the returned row isn't of type Dast::ProfileSchedule so I have added target_type to the query to make it more deterministic and in turn reduce the flakiness of the test.

This test caused a broken master recently: gitlab-org/quality/engineering-productivity/master-broken-incidents#8575 (comment 2125980899)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading