Updated the calendar to improve opportunity display and navigation

This commit is contained in:
2026-10-27 03:22:10 -03:00
parent 7606643ff4
commit 1d5b28e95b
51 changed files with 1486 additions and 1237 deletions

View File

@@ -120,7 +120,7 @@ test("installBase sorts typed values and restores the selected header across app
const second = setup(storage);
second.app.installBaseView.openInstallBaseModal(customer).render(items);
const rows = walk(second.overlay).find(node => node.tag === "tbody").children;
assert.equal(rows[0].children[7].textContent, "2");
assert.equal(rows[0].children[6].textContent, "2");
assert.equal(walk(second.overlay).find(node => node.attributes["data-sort-key"] === "quantity").parent.attributes["aria-sort"], "ascending");
assert.equal(items[0].quantity, 10);
});
@@ -136,13 +136,13 @@ test("installed base searches every displayed column and formatted values, inclu
currentSupport: 1234.56, orderNumber: "ORD-321", supportStatus: "ACTIVE", quantityType: "Processor",
quantity: 7, supportStartDate: "2026-03-12", supportEndDate: "2027-04-13", licenseValue: 9876.54, shipDate: "2020-05-14",
hiddenField: "secretword" };
input.value = "sao beta";
input.value = "group beta";
input.listeners.input();
assert.equal(modal.attributes["aria-busy"], "true");
view.render([row, { productName: "Other product" }]);
const rows = () => walk(modal).filter(node => node.tag === "td").length / 12;
const rows = () => walk(modal).filter(node => node.tag === "td").length / 11;
assert.equal(rows(), 1);
for (const query of [...Object.values(row).slice(0, 12), "1,234.56", "9,876.54", "12/03/2026", "13/04/2027", "14/05/2020"]) {
for (const query of [...Object.values(row).slice(1, 12), "1,234.56", "9,876.54", "12/03/2026", "13/04/2027", "14/05/2020"]) {
input.value = String(query); input.listeners.input();
assert.equal(rows(), 1, String(query));
assert.equal(walk(modal).find(node => node.tag === "input"), input, "input is not replaced while typing");
@@ -160,7 +160,7 @@ test("installed base searches every displayed column and formatted values, inclu
assert.ok(walk(modal).some(node => node.textContent === "Synthetic failure"));
app.installBaseView.closeInstallBaseModal();
app.installBaseView.openInstallBaseModal(customer).render([row]);
assert.equal(walk(overlay).filter(node => node.tag === "td").length, 12, "reopening starts without an invisible filter");
assert.equal(walk(overlay).filter(node => node.tag === "td").length, 11, "reopening starts without an invisible filter");
});
test("modal shows skeleton, renders only requested fields safely and ignores closed/replaced responses", () => {
@@ -168,7 +168,7 @@ test("modal shows skeleton, renders only requested fields safely and ignores clo
const first = app.installBaseView.openInstallBaseModal(customer);
const modal = overlay.children[0];
assert.equal(modal.attributes["aria-busy"], "true");
assert.equal(walk(modal).filter(node => node.tag === "th").length, 12);
assert.equal(walk(modal).filter(node => node.tag === "th").length, 11);
const second = app.installBaseView.openInstallBaseModal(customer);
first.render([{ productName: "Stale product" }]);
assert.equal(overlay.children[0].attributes["aria-busy"], "true");
@@ -176,14 +176,14 @@ test("modal shows skeleton, renders only requested fields safely and ignores clo
currentSupport: 1234.56, licenseValue: 0, supportStartDate: "2026-03-12", secret: "not-visible" }]);
const current = overlay.children[0];
const cells = walk(current).filter(node => node.tag === "td");
assert.equal(cells.length, 12);
assert.equal(cells[2].textContent, "<script>unsafe</script>");
assert.equal(cells[2].children.length, 0);
assert.equal(cells[3].textContent, "1,234.56");
assert.equal(cells[5].children[0].dataset.status, "ACTIVE");
assert.equal(cells[7].textContent, "0");
assert.equal(cells[10].textContent, "0.00");
assert.ok(cells[8].textContent.includes("2026"));
assert.equal(cells.length, 11);
assert.equal(cells[1].textContent, "<script>unsafe</script>");
assert.equal(cells[1].children.length, 0);
assert.equal(cells[2].textContent, "1,234.56");
assert.equal(cells[4].children[0].dataset.status, "ACTIVE");
assert.equal(cells[6].textContent, "0");
assert.equal(cells[9].textContent, "0.00");
assert.ok(cells[7].textContent.includes("2026"));
current.listeners.keydown({ key: "Tab", preventDefault() {} });
assert.equal(document.activeElement.type, "search");
current.listeners.keydown({ key: "Tab", preventDefault() {} });