From b4538202eff8851237b98eb4e3e883639cabff01 Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Wed, 1 May 2024 17:05:34 +0200 Subject: [PATCH] Fix #506: Unit tests not rendering (#508) --- .changes/unreleased/Docs-20240501-021050.yaml | 6 ++++++ src/app/services/graph.service.js | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changes/unreleased/Docs-20240501-021050.yaml diff --git a/.changes/unreleased/Docs-20240501-021050.yaml b/.changes/unreleased/Docs-20240501-021050.yaml new file mode 100644 index 000000000..8799a69de --- /dev/null +++ b/.changes/unreleased/Docs-20240501-021050.yaml @@ -0,0 +1,6 @@ +kind: Docs +body: Unit tests not rendering +time: 2024-05-01T02:10:50.987412+02:00 +custom: + Author: aranke + Issue: "506" diff --git a/src/app/services/graph.service.js b/src/app/services/graph.service.js index 43c7935e0..8513d1d94 100644 --- a/src/app/services/graph.service.js +++ b/src/app/services/graph.service.js @@ -381,8 +381,9 @@ angular _.each(_.filter(service.manifest.nodes, function(node) { // operation needs to be a graph type so that the parent/child map can be resolved even though we won't be displaying it var is_graph_type = _.includes(['model', 'seed', 'source', 'snapshot', 'analysis', 'exposure', 'metric', 'semantic_model', 'operation'], node.resource_type); - var is_singular_test = node.resource_type == 'test' && !node.hasOwnProperty('test_metadata'); - return is_graph_type || is_singular_test; + var is_singular_test = node.resource_type === 'test' && !node.hasOwnProperty('test_metadata'); + var is_unit_test = node.resource_type === 'unit_test'; + return is_graph_type || is_singular_test || is_unit_test; }), function(node) { var node_obj = { group: "nodes",