fix: recover renamed repositories by ID and hide archived actions

This commit is contained in:
Thomas Durieux committed 2026-10-07 11:10:30 +00:00
1 parent 3140ad3c45
commit a7ae790640
8 files changed
+54 -11

No files matched your search

+11
View File
@@ -155,6 +155,17 @@ describe("Vue 3 UI", function () {
expect(ui.errors).to.deep.equal([]);
});
it("hides connection changes on archived resources", async function () {
ui = await browser("/connections", {
"/github/connections": { appEnabled: true, appConnected: true, oauthConnected: true,
resources: [{ type: "repository", id: "archived", connection: "github-app", status: "archived", eligible: true }] },
});
const resource = ui.window.document.querySelector(".connection-resource");
expect(resource).not.to.equal(null);
expect(resource.querySelectorAll("button")).to.have.length(0);
expect(ui.errors).to.deep.equal([]);
});
for (const connection of ["oauth", "github-app"]) {
it(`previews and saves ${connection} access with CSRF protection`, async function () {
const action = connection === "github-app" ? "Reconnect read-only access" : "Switch to read-only access";