Implemented the Organization Chart feature to create customer organizational
This commit is contained in:
@@ -81,6 +81,7 @@ test("ten columns retain their links and put product/customer controls below the
|
||||
assert.equal(customer.children[1].children[0].title, "View customer consumption");
|
||||
assert.equal(customer.children[1].children[1].title, "View customer installed base");
|
||||
assert.equal(customer.children[1].children[2].title, "View customer service requests");
|
||||
assert.equal(customer.children[1].children[3].title, "View customer organization chart");
|
||||
assert.equal(findClass(h.cell("optyNumber"), "opportunities-extension-copy-button").title, "Copy opportunity number");
|
||||
assert.equal(findClass(h.cell("name"), "opportunities-extension-action-button"), undefined);
|
||||
assert.equal(findClass(h.cell("customer"), "opportunities-extension-products-count"), undefined);
|
||||
@@ -267,7 +268,7 @@ test("loading skeleton preserves columns and action slots, then disappears on su
|
||||
assert.equal(row.attributes["aria-hidden"], "true");
|
||||
assert.deepEqual(row.children.map(cell => cell.attributes["data-column"]), h.headers().map(header => header.attributes["data-column"]));
|
||||
assert.ok(row.children.every(cell => findClass(cell, "opportunities-extension-account-plans-skeleton-bar")));
|
||||
assert.equal(walk(row).filter(node => hasClass(node, "opportunities-extension-table-skeleton-badge")).length, 7);
|
||||
assert.equal(walk(row).filter(node => hasClass(node, "opportunities-extension-table-skeleton-badge")).length, 8);
|
||||
assert.equal(walk(row).some(node => node.tag === "button" || node.tag === "a"), false);
|
||||
}
|
||||
h.app.opportunitiesTable.setOpportunitiesTableState({ status: nextStatus, items: nextStatus === "ready" ? [synthetic()] : [], message: "" });
|
||||
@@ -295,14 +296,14 @@ test("table styles reserve compact widths, prioritize Name/Customer and keep nes
|
||||
assert.deepEqual(flexible, ["name", "customer"]);
|
||||
assert.match(css, /th\[data-column="owner"\] \{ width: 132px;/);
|
||||
assert.doesNotMatch(css, /width: (?:calc|clamp)\(/);
|
||||
assert.match(css, /min-width: 1120px/);
|
||||
assert.match(css, /min-width: 1168px/);
|
||||
assert.match(css, /min-height: 2\.7em/);
|
||||
assert.match(css, /padding-bottom: 38px/);
|
||||
const actions = css.match(/\.opportunities-extension-cell-actions \{([^}]+)\}/)[1];
|
||||
assert.match(actions, /position: absolute/);
|
||||
assert.match(actions, /bottom: 10px/);
|
||||
assert.match(actions, /height: 24px/);
|
||||
assert.match(css, /min-width: 84px/);
|
||||
assert.match(css, /min-width: 114px/);
|
||||
assert.match(css, /flex: 0 0 24px/);
|
||||
assert.match(css, /td\[data-column="customer"\] \{\s*position: relative;/);
|
||||
assert.match(css, /grid-template-columns: minmax\(0, 1fr\) 12px/);
|
||||
@@ -312,12 +313,12 @@ test("table styles reserve compact widths, prioritize Name/Customer and keep nes
|
||||
assert.doesNotMatch(tableRules, /text-overflow: ellipsis|overflow: hidden|th:nth-child|td:nth-child/);
|
||||
assert.match(css, /\.opportunities-extension-products-ramp\s*\{[^}]*background: #f0e8f7/);
|
||||
assert.match(css, /\[data-theme="dark"\] \.opportunities-extension-products-ramp\s*\{[^}]*color: #ead5fc/);
|
||||
for (const width of [1120, 1280, 1440, 1840]) {
|
||||
for (const width of [1168, 1280, 1440, 1840]) {
|
||||
const remaining = width - fixed;
|
||||
assert.equal(fixed + remaining / 2 + remaining / 2, width);
|
||||
assert.ok(remaining > 0);
|
||||
assert.ok(remaining / 2 >= 12 + 84, "three customer controls fit after the left inset");
|
||||
assert.ok(remaining / 2 >= 12 + 114, "four customer controls fit after the left inset");
|
||||
}
|
||||
const allCss = ["src/content/styles/redwood.css", "src/features/debug/styles.css", "src/features/opportunities/styles.css", "src/features/install-base/styles.css", "src/features/service-requests/styles.css", "src/features/consumption/plan-detail.css", "src/features/ratecard/styles.css", "src/features/opportunities/customer-table-search.css", "src/features/opportunities/calendar.css", "src/features/manage-time/styles.css", "src/features/products/ramp-projection.css"].map(read).join("\n");
|
||||
const allCss = ["src/content/styles/redwood.css", "src/features/debug/styles.css", "src/features/opportunities/styles.css", "src/features/install-base/styles.css", "src/features/service-requests/styles.css", "src/features/consumption/plan-detail.css", "src/features/ratecard/styles.css", "src/features/opportunities/customer-table-search.css", "src/features/opportunities/calendar.css", "src/features/manage-time/styles.css", "src/features/products/ramp-projection.css", "src/features/org-chart/styles.css"].map(read).join("\n");
|
||||
assert.ok(composeScript("content").includes(`const redwoodStyles = ${JSON.stringify(allCss)};`));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user