fix: reload explorer state when repository identity changes

This commit is contained in:
tdurieux
2026-09-06 10:47:03 +02:00
parent b6c0d3a8ed
commit a27f9f34d6
4 changed files with 25 additions and 5 deletions
+6
View File
@@ -85,4 +85,10 @@ describe("frontend production regressions", function () {
h.navigate("fourth.pdf"); third.reject({ status: 500 }); await h.flush();
expect(h.scope.type).to.equal("pdf");
});
it("reloads the repository when only its ID changes", function () {
const h = explorer(); h.scope.files = [{ name: "old", path: "old" }];
h.params.repoId = "new-repo"; h.emit("$routeUpdate");
expect(h.scope.repoId).to.equal("new-repo"); expect(h.scope.files).to.have.length(0);
expect(h.requests.at(-1).url).to.equal("/api/repo/new-repo/options");
});
});