Merge branch 'integrate/source-errors' into fix/source-failure-classification

# Conflicts:
#	public/asset-manifest.json
#	public/script/app.js
#	public/script/vendor.min.js
This commit is contained in:
Thomas Durieux committed 2026-11-14 23:40:39 +00:00
commit 8e1bbffbe3
4 files changed
+29 -8

No files matched your search

+19
View File
@@ -924,6 +924,25 @@ describe("Vue 3 UI", function () {
});
}
for (const code of ["github_app_reconnect_required", "token_expired"]) {
it(`offers account reconnection when source loading returns ${code}`, async () => {
ui = await browser("/anonymize", {
...repositorySource,
"/api/repo/owner/repo/": { __status: 403, body: { error: code } },
});
const state = ui.window.document.querySelector("#sourceUrl")._field.binding.state;
state.sourceUrl = "https://github.com/owner/repo";
await state.urlSelected();
await delay(30);
expect(state.sourceProblem().kind).to.equal("reconnect");
expect(state.sourceProblem().manage).to.equal("link");
expect(state.sourceReady()).to.equal(false);
expect(ui.window.document.querySelector('.source-error a[href="/connections"]')).not.to.equal(null);
expect(ui.window.document.querySelector('.rp-error a[href="/connections"]')).not.to.equal(null);
expect(ui.errors).to.deep.equal([]);
});
}
it("recovers edit source validity after a failed branch refresh", async () => {
let fail = false;
ui = await browser("/anonymize/saved", {