Fix flaky specs due to label ordering

What does this MR do and why?

Label notes are ordered by name so we also order the assertion by name

Example failure:

     Failure/Error:
       expect(discussions.first.notes.map(&:note)).to match_array(
         ["added #{label.to_reference} #{label_2.to_reference} labels"]
       )
     
       expected collection contained:  ["added ~39 ~40 labels"]
       actual collection contained:    ["added ~40 ~39 labels"]
       the missing elements were:      ["added ~39 ~40 labels"]
       the extra elements were:        ["added ~40 ~39 labels"]

References

MR acceptance checklist

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

Edited by Heinrich Lee Yu

Merge request reports

Loading