Badge indicator showing whether an opportunity has an associated Service Request
This commit is contained in:
@@ -116,6 +116,22 @@ test("products remain expandable with AI summary and a ten-column detail row aft
|
||||
assert.deepEqual(h.summaries, ["B"], "collapsing does not generate another summary");
|
||||
});
|
||||
|
||||
test("CRM SR badge follows Ramp Months and remains visible while product data is pending", async () => {
|
||||
const h = setup();
|
||||
h.app.fusionCrmServiceRequests.requestCrmServiceRequest = async () => [{
|
||||
SrNumber: "SR-SYNTH", OpportunityName_Id_c: { OptyNumber: "TEST-1" }, ReportedHours_c: 0
|
||||
}];
|
||||
await h.app.opportunityCrmServiceRequests.load("synthetic", h.app.opportunitiesQueryState.periodRequestVersion);
|
||||
h.app.opportunitiesTable.renderOpportunitiesTable();
|
||||
assert.equal(findClass(h.cell("name"), "opportunities-extension-crm-sr-badge").textContent, "\u2705 SR");
|
||||
h.app.productsContentState.opptyProductsByNumber.set("TEST-1", { items: [{ RampMonths_c: 3 }] });
|
||||
h.app.opportunitiesTable.renderOpportunitiesTable();
|
||||
const actions = h.cell("name").children[0].children[1];
|
||||
assert.deepEqual(actions.children.map(child => child.textContent), ["1", "RM 3", "\u2705 SR"]);
|
||||
findClass(h.cell("name"), "opportunities-extension-products-count").click();
|
||||
assert.ok(findClass(h.rows()[1], "opportunities-extension-products-table"));
|
||||
});
|
||||
|
||||
test("product table distinguishes unavailable ramp months from numeric zero", () => {
|
||||
const h = setup();
|
||||
h.app.productsContentState.opptyProductsByNumber.set("TEST-1", {
|
||||
|
||||
Reference in New Issue
Block a user