test: implement comprehensive unit tests for components (#487)

This commit is contained in:
Fine0830
2025-08-06 18:35:45 +08:00
committed by GitHub
parent b73ae65efc
commit fc631381c7
19 changed files with 3070 additions and 24 deletions

View File

@@ -105,7 +105,7 @@ limitations under the License. -->
) {
const serviceId = (selectorStore.currentService && selectorStore.currentService.id) || "";
if (!serviceId) {
return ElMessage.error("No Service ID");
return ElMessage.error("Service ID is required");
}
const res = await continousProfilingStore.setContinuousProfilingPolicy(serviceId, targets);
if (res.errors) {

View File

@@ -174,6 +174,7 @@ export default class ListGraph {
.style("display", "block")
.style("left", `${offsetX + 30}px`)
.style("top", `${offsetY + 40}px`);
t.selectedNode?.classed("highlighted", false);
t.selectedNode = d3.select(this);
if (t.handleSelectSpan) {
t.handleSelectSpan(d);

View File

@@ -315,6 +315,7 @@ export default class TraceMap {
.style("display", "block")
.style("left", `${offsetX + 30}px`)
.style("top", `${offsetY + 40}px`);
t.selectedNode?.classed("highlighted", false);
t.selectedNode = d3.select(this.parentNode);
if (t.handleSelectSpan) {
t.handleSelectSpan(d);