mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-19 06:07:21 +02:00
fix: verify reconnects through supported GitHub routes and protect active jobs
This commit is contained in:
commit
e6073941b9
18 files changed
+533
-67
No files matched your search
+5
-2
@@ -155,10 +155,11 @@ describe("Vue 3 UI", function () {
|
||||
expect(ui.errors).to.deep.equal([]);
|
||||
});
|
||||
|
||||
it("hides connection changes on archived resources", async function () {
|
||||
for (const status of ["archived", "preparing", "queue", "download", "removing", "expiring"]) {
|
||||
it(`hides connection changes on ${status} 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 }] },
|
||||
resources: [{ type: "repository", id: "archived", connection: "github-app", status, eligible: true }] },
|
||||
});
|
||||
const resource = ui.window.document.querySelector(".connection-resource");
|
||||
expect(resource).not.to.equal(null);
|
||||
@@ -166,6 +167,8 @@ describe("Vue 3 UI", function () {
|
||||
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";
|
||||
|
||||
Reference in new issue
Block a user