Loading
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
encodingmust not affectVERSION). - 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
- Parent issue: #545279 (closed)
- Source MRs for the covered behaviors: !250523 (merged), !183594 (merged), !189962 (merged), !249473 (merged), !246285 (merged), !246286 (merged)
Screenshots or screen recordings
Test-only change, no UI impact.
How to set up and validate locally
-
Generate the fixtures:
bundle exec rspec ee/spec/frontend/fixtures/repository_integration.rb -
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