mirror of
https://github.com/github/awesome-copilot.git
synced 2026-08-09 02:29:13 +00:00
Harden sign-in cancellation behavior
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -118,6 +118,9 @@ test("interactive sign-in reports pending then done and caches the ARM token", a
|
||||
assert.equal(authenticateOptions.abortSignal.aborted, false);
|
||||
assert.deepEqual(broker.getSignInStatus(started.sessionId), { ok: true, status: "done" });
|
||||
assert.deepEqual(broker.getSignInStatus(started.sessionId), { ok: true, status: "done" });
|
||||
assert.deepEqual(broker.cancelSignIn(started.sessionId), { ok: true });
|
||||
assert.equal(authenticateOptions.abortSignal.aborted, false);
|
||||
assert.deepEqual(broker.getSignInStatus(started.sessionId), { ok: true, status: "done" });
|
||||
assert.equal(await broker.getToken(), "token");
|
||||
});
|
||||
|
||||
@@ -266,6 +269,12 @@ test("sign-in failures are surfaced through the status endpoint contract", async
|
||||
status: "error",
|
||||
error: "browser launch failed",
|
||||
});
|
||||
assert.deepEqual(broker.cancelSignIn(started.sessionId), { ok: true });
|
||||
assert.deepEqual(broker.getSignInStatus(started.sessionId), {
|
||||
ok: false,
|
||||
status: "error",
|
||||
error: "browser launch failed",
|
||||
});
|
||||
});
|
||||
|
||||
test("legacy credential cleanup retries after a transient failure", async () => {
|
||||
|
||||
Reference in New Issue
Block a user