Add follow-up integration tests for repository path locks

What does this MR do and why?

This MR adds 7 integration tests (3 new recorded fixtures) for cases we currently do not have coverage in path lock integration tests

  • A reporter (cannot create or destroy locks) viewing a file inside a locked directory still sees the lock state — regression test for !250523 (merged).
  • A file outside a locked directory still shows a plain Lock button, guarding the path prefix matching (a lock on encoding must not affect VERSION).
  • Replace and Delete in the File actions dropdown are disabled when the file is locked by someone else on the default branch, and stay enabled on a non-default branch.
  • Directory-on-directory locks on the tree page: a lock on a parent (files) or nested (files/ruby) directory shows the related-lock alert with a View lock link pointing at the locked path.
  • The lock-owner card: "Locked by" header with relative timestamp, profile link, user details lazy-loaded from the REST users API when the disclosure opens, and the toast messages for all four lock/unlock actions.

References

Screenshots or screen recordings

Test-only change, no UI impact.

How to set up and validate locally

  1. Generate the fixtures:

    bundle exec rspec ee/spec/frontend/fixtures/repository_integration.rb
  2. Run the suite on both Vue lanes:

    yarn jest:integration ee/spec/frontend/integration/repository/
    VUE_VERSION=3 yarn jest:integration ee/spec/frontend/integration/repository/

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 Chaoyue Zhao

Merge request reports

Loading
Loading