The sessions required for Internal SR API calls are now loaded via an iframe

This commit is contained in:
2026-09-29 17:48:03 -03:00
parent 4d3f1f9760
commit 3fd89a307c
13 changed files with 366 additions and 35 deletions

View File

@@ -3,7 +3,7 @@ const { test } = require("node:test");
const { loadApplication } = require("./support/application.cjs");
const flush = () => new Promise(resolve => setImmediate(resolve));
test("internal SR uses Session without TokenRelay or retries on 401", async () => {
test("internal SR uses Session without TokenRelay and reports unavailable iframe host", async () => {
const h = setup();
let renewals = 0;
const sent = [];
@@ -24,7 +24,7 @@ test("internal SR uses Session without TokenRelay or retries on 401", async () =
assert.equal(sent.length, 1);
assert.equal(sent[0].token, undefined);
assert.ok(sent.every(item => item.type === "opportunitiesExtension.requestInternalServiceRequest"));
assert.ok(h.walk(h.panel()).some(node => node.textContent === "Unauthorized"));
assert.ok(h.walk(h.panel()).some(node => node.attributes.role === "alert"));
});
function setup() {